Open rrrix opened 4 years ago
Hey @rrrix, thanks for bringing this up. Your proposed fixes look very reasonable, I would recommend going with number 3 (config.ini udpate with the default value being False). If you would like to submit the PR, by all means please do!
Hello!
I received the following error when attempting to deploy:
The new ARN and resource ID format must be enabled to work with ECS managed tags. Opt in to the new format and try again. (Service: AmazonECS; Status Code: 400; Error Code: InvalidParameterException;)
Full error log:I think this is half a problem of the Jenkins-On-AWS project and the AWS CDK: 1) It's not documented in this project's README.md that it's required to Opt-In to the new ARN/ID format (for using ECS Managed Tags) 2) The CDK assumes the account / principal has opted-in if using
enable_ecs_managed_tags=True
and it's not readily apparent this is required until deploy-time (when it fails)The issue, and resolution, is summarized here: https://github.com/aws/aws-cdk/issues/3844#issuecomment-526973257
For those who come here experiencing the same problem, the resolution is (roughly) below. See the issue above if using CodePipeline for additional fixes.
I'm happy to submit a PR with the appropriate fix, which may be one of:
1) Flip the default
enable_ecs_managed_tags=True
toFalse
2) Improve documentation / README: Add a note indicating that the new ARN / ID format Opt-In is required, and add the above manual AWS CLI fix so users are aware of an easy fix without Googling for a possible solution, or resorting to manual actions in the AWS Console. 3) Add a config.ini setting to allow the user to toggle this prior to deployment (for example:config['DEFAULT']['enable_ecs_managed_tags']
)