Blocking instance metadata and ecs task metadata endpoint #1760
Replies: 2 comments
-
Hi @joshpollara, you’re correct that a bootstrap container is probably the best way to set that up. Bootstrap containers are guaranteed to run before any orchestrated containerized workload. I would recommend creating More information about bootstrap containers and on how to use them can be found here. For IMDS, another alternative is to enforce IMDSv2 and restrict the metadata response hop limit to 1 (should be the default) in the instance launch options, so containers are effectively blocked off from IMDS but not the host itself (see here). You can modify existing hosts with the Please let us know if you need any further help! |
Beta Was this translation helpful? Give feedback.
-
@etungsten thank you! very helpful |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm interested in blocking containers from gaining access to the ec2 instance metadata endpoint and the ecs task metadata endpoint. I am able to restrict access with
iptables
through the admin container but it's not clear to me how to automate this process. Is this something a bootstrap container should be doing? Looking for some direction. Thank you.Beta Was this translation helpful? Give feedback.
All reactions