aws-ecs: setting ECS_AWSVPC_BLOCK_IMDS to true #24631
Replies: 3 comments
-
I believe it's defined here aws-cdk/packages/@aws-cdk/aws-ecs/lib/cluster.ts Lines 440 to 441 in ce18037 Can you share your use case why you need |
Beta Was this translation helpful? Give feedback.
-
I ended up using I am using Elastic Inference in ECS. I noticed that if the task cannot access the instance role, the task will fail to get access to EI. I tried to use the task_role for that matter but failed to do so. It would be great if you can provide the best practice. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately I don't have recommended practice at this moment. I am moving this to discussion and open for further comments or ideas from the community. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I have the following snippet:
The generated user data by
ec2.UserData.for_linux()
generatesecho ECS_AWSVPC_BLOCK_IMDS=true >> /etc/ecs/ecs.config
which I want to change to false. If I useadd_command
beforeself.cluster.add_asg_capacity_provider(capacity_provider)
the command will add at the top of generated user data. But if I useadd_command
after it, it will add at the end of generated user data as expected.Expected Behavior
Current Behavior
Reproduction Steps
use
add_command
beforeself.cluster.add_asg_capacity_provider(capacity_provider)
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.64.0 (build fb67c77)
Framework Version
No response
Node.js Version
v18.12.1
OS
Ubuntu 22.04.1 LTS
Language
Python
Language Version
No response
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions