使用BitBucket作为CodePipeline源时的权限错误

发布于 2025-02-13 18:51:33 字数 1053 浏览 2 评论 0原文

我想将Bitbucket用作源,

我在下面有这样的权限错误。

我想我应该允许AWSCloudFormation角色,但是我该怎么做?

User: arn:aws:sts::678100228133:assumed-role/cdk-hnb659fds-cfn-exec-role-678100228133-us-west-2/AWSCloudFormation is not authorized to perform: codestar-connections:Pas
sConnection on resource: ari:cloud:bitbucket::app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar (Service: AWSCodePipeline; Status Code: 400; Error Code: AccessDen
iedException; Request ID: 0d152b96-e756-4821-9ad1-7551cb9e8bf7; Proxy: null)

我的CDK代码是这样的,Ari:cloud:bitbucket :: app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar已经是手动设置的。

const bitbucketSourceOutput = new cdk.aws_codepipeline.Artifact();
const bitbucketSourceAction = new cdk.aws_codepipeline_actions.CodeStarConnectionsSourceAction({
  actionName: `ss-${targetEnv}-ecs-bitbucket-build`,
  owner: 'aws',
  repo: 'myname/testrepo',
  output: bitbucketSourceOutput,
  connectionArn: 'ari:cloud:bitbucket::app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar',
});

I want to use bitbucket as source,

I have the permission error like this below.

I guess I should give the permission to AWSCloudFormation role, however how can I do it?

User: arn:aws:sts::678100228133:assumed-role/cdk-hnb659fds-cfn-exec-role-678100228133-us-west-2/AWSCloudFormation is not authorized to perform: codestar-connections:Pas
sConnection on resource: ari:cloud:bitbucket::app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar (Service: AWSCodePipeline; Status Code: 400; Error Code: AccessDen
iedException; Request ID: 0d152b96-e756-4821-9ad1-7551cb9e8bf7; Proxy: null)

My cdk code is like this, ari:cloud:bitbucket::app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar is already set manually.

const bitbucketSourceOutput = new cdk.aws_codepipeline.Artifact();
const bitbucketSourceAction = new cdk.aws_codepipeline_actions.CodeStarConnectionsSourceAction({
  actionName: `ss-${targetEnv}-ecs-bitbucket-build`,
  owner: 'aws',
  repo: 'myname/testrepo',
  output: bitbucketSourceOutput,
  connectionArn: 'ari:cloud:bitbucket::app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar',
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾`听者〃 2025-02-20 18:51:34

ari:cloud:bitbucket :: app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar不是有效的codestar连接。 CodeStar Connection ARN看起来像这样:ARN:AWS:CODESTAR连接:EU-West-1:123456789012:Connection/Connection/991F-27E07658DD59-344E-44D2-ADEA4D2-ADEA40DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

AWS控制台并在管道中使用其ARN。

ari:cloud:bitbucket::app/{67a68345-bf8e-49c5-8eca-833727e2d892}/aws-codestar is not a valid CodeStar connection ARN. A codestar connection ARN looks like this: arn:aws:codestar-connections:eu-west-1:123456789012:connection/991f-27e07658dd59-344e-44d2-adea40dd

You need to create a CodeStar connection in the AWS console and use its ARN in your pipeline.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文