从ECS任务访问主机元数据

0

【以下的问题经过翻译处理】 我知道可以使用ECS任务元数据终端节点获取有关ECS任务的元数据。如果任务在ECS EC2实例上运行,是否可以从任务中访问主机元数据?对于ECS Fargate任务呢?

profile picture
EXPERT
asked 6 months ago18 views
1 Answer
0

【以下的回答经过翻译处理】 你好,bwhaley,

如果你在ECS容器实例上运行ECS任务(EC2类型),你可以调用EC2 IMDS终端节点 (http://169.254.169.254/latest/meta-data/instance-id) 获取主机元数据。

但是,对于在ECS Fargate上运行的ECS任务,这是不被允许的。

希望这有所帮助!

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions