aws-ecs-patterns fail to deploy when not opted into ECS managed tags
See original GitHub issue🐛 Bug Report
What is the problem?
Deploying an aws-ecs-patterns to an AWS tenant that is not opted into the ECS Managed Tags feature will fail. This is can be resolved by adding the feature to set the enableECSManagedTags property to false through the LoadBalancedServiceBaseProps.
Reproduction Steps
- (In my case) Deploy a LoadBalancedFargateService to an AWS tenant that is not opted into the ECS Managed Tags feature.
- Cloudformation will return the error “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.” when deploying the ECS service.
- (Hacky solution) In
load-balanced-fargate-service.js
, addenableECSManagedTags: false
to the “Service” props and the stack will deploy.
Verbose Log
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; Request ID: 91d4b3b3-8529-40b1-9b55-16f820f23743)
new BaseService (/projects/fargate-pwa-starter-kit/server/node_modules/@aws-cdk/aws-ecs/lib/base/base-service.js:39:25)
\_ new FargateService (/projects/fargate-pwa-starter-kit/server/node_modules/@aws-cdk/aws-ecs/lib/fargate/fargate-service.js:30:9)
\_ new LoadBalancedFargateService (/projects/fargate-pwa-starter-kit/server/node_modules/@aws-cdk/aws-ecs-patterns/lib/fargate/load-balanced-fargate-service.js:30:24)
\_ new BonjourFargate (/projects/fargate-pwa-starter-kit/server/dist/index.js:31:32)
\_ Object.<anonymous> (/projects/fargate-pwa-starter-kit/server/dist/index.js:52:1)
\_ Module._compile (module.js:653:30)
\_ Object.Module._extensions..js (module.js:664:10)
\_ Module.load (module.js:566:32)
\_ tryModuleLoad (module.js:506:12)
\_ Function.Module._load (module.js:498:3)
\_ Function.Module.runMain (module.js:694:10)
\_ startup (bootstrap_node.js:204:16)
\_ bootstrap_node.js:625:3
Environment
- CDK CLI Version: 1.6.0
- Module Version: 1.6.0
- OS: OSX Mojave
- Language: TypeScript/all
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Troubleshoot issues related to tagging tasks in Amazon ECS
You're unable to add tags to your ECS resources due to missing AWS Identity and Access Management (IAM) permissions or tag restrictions.
Read more >Best practices for CI/CD using AWS Fargate and Amazon ECS
Safe deployments. Page 57. Best practices for CI/CD. 3. Repeatable infrastructure changes. 1. Automated releases. 2. Safe.
Read more >@aws-cdk/aws-ecs-patterns - npm
The CDK Construct Library for AWS::ECS. Latest version: 1.183.0, last published: 3 days ago. Start using @aws-cdk/aws-ecs-patterns in your ...
Read more >8 - ECS Troubleshooting - Harness.io Docs
General troubleshooting steps for ECS deployments. ... If you have not opted into the new ECS ARN and resource ID format before you ......
Read more >AWS ECS service error: Task long arn format must be enabled ...
It seems like you are Tagging Your Amazon ECS Resources but you did not opt-in to this feature so you have to opt-in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Opting in by default (at root level) for the lazy
If you are using CodePipeline, you have to attach a managed policy to your pipeline object as well as opting in.
If that doesn’t work, and this is a dev env, try admin
Reference: ECS: Migrating to new ARN
I’m able to successfully deploy to a non-opted-in account on 1.7.0 thanks to #3887.