New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(codebuild): more friendly exception message related to build of Codebuild project #13812
Labels
@aws-cdk/aws-codebuild
Related to AWS CodeBuild
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
in-progress
This issue is being actively worked on.
p1
Comments
HsiehShuJeng
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 26, 2021
skinny85
added a commit
to skinny85/aws-cdk
that referenced
this issue
Mar 26, 2021
If you forget the region part of the ARN for an IAM resource like a Role (and considering the region is never provided for IAM resources, it's easy to forget, as you have to provide it as `::`), the IAM library doesn't catch this error, and you only find out about it at deployment time, with a very confusing `Fn::Select cannot select nonexistent value at index 5` message from CloudFormation. Re-factor the ARN parsing code in core a little bit to allow us to catch this common error. Fixes aws#13812
Thanks for opening the issue @HsiehShuJeng! I think you're right, I submitted a PR to fail faster for this error: #13821. Thanks, |
skinny85
added
effort/small
Small work item – less than a day of effort
in-progress
This issue is being actively worked on.
p1
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Mar 26, 2021
mergify bot
pushed a commit
that referenced
this issue
Mar 30, 2021
…ARN (#13821) If you forget the region part of the ARN for an IAM resource like a Role (and considering the region is never provided for IAM resources, it's easy to forget, as you have to provide it as `::`), the IAM library doesn't catch this error, and you only find out about it at deployment time, with a very confusing `Fn::Select cannot select nonexistent value at index 5` message from CloudFormation. Re-factor the ARN parsing code in core a little bit to allow us to catch this common error. Fixes #13812 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
hollanddd
pushed a commit
to hollanddd/aws-cdk
that referenced
this issue
Mar 31, 2021
…ARN (aws#13821) If you forget the region part of the ARN for an IAM resource like a Role (and considering the region is never provided for IAM resources, it's easy to forget, as you have to provide it as `::`), the IAM library doesn't catch this error, and you only find out about it at deployment time, with a very confusing `Fn::Select cannot select nonexistent value at index 5` message from CloudFormation. Re-factor the ARN parsing code in core a little bit to allow us to catch this common error. Fixes aws#13812 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd
pushed a commit
to hollanddd/aws-cdk
that referenced
this issue
Aug 26, 2021
…ARN (aws#13821) If you forget the region part of the ARN for an IAM resource like a Role (and considering the region is never provided for IAM resources, it's easy to forget, as you have to provide it as `::`), the IAM library doesn't catch this error, and you only find out about it at deployment time, with a very confusing `Fn::Select cannot select nonexistent value at index 5` message from CloudFormation. Re-factor the ARN parsing code in core a little bit to allow us to catch this common error. Fixes aws#13812 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-codebuild
Related to AWS CodeBuild
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
in-progress
This issue is being actively worked on.
p1
Description
I created a CDK application to deploy a Codebuild project. When deploying the project via
cdk deploy
after executingnpm install
,npm run build
,cdk synth
, andcdk diff
with success, I got the following exception message:I searched the json template under
cdk.out
withFn::Select:
and finally figured out the problem is at the assignment of the role that the Codebuild project will utilize. In this case, I intended to import an external existing IAM role byRole.fromRoleArn()
, and a colon is missing betweeniam
andACCOUNT_ID
as the ARN of the IAM role.Reproduction Steps
test01-AwsCicd-ap-northeast-1-CodeBuildRole
.iam
andACCOUNT_ID
as the ARN of the role.What did you expect to happen?
I expect that in the error message, a more vivid message can be presented, such as something wrong is at the argument of
role
or something wrong related to the import of an external IAM role.What actually happened?
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: