スキップしてコンテンツを表示

Why is the EC2 instance intermittently receiving a 503 Service Unavailable error when accessing the Instance Metadata Service at http://169.254.169.254/latest/meta-data/iam/security-credentials/?

0
ERROR: Error retrieving credentials from the instance profile metadata service. (Server error: `GET http://169.254.169.254/latest/meta-data/iam/security-credentials/` resulted in a `503 Service Unavailable` 

While debugging, I came across blogs suggesting to enable Instance metadata service by default so when an instance is launched, and the instance metadata options are automatically configured.

Does this mean the instance won’t need to explicitly hit the metadata endpoint if IMDS is enabled by default? Also, could enabling IMDS settings introduce any breaking changes or impact application behavior?

1回答
0

Hello.

I don't think there will be any problems if you enable IMDS.
On the other hand, if you don't enable it, you will not be able to use the IAM role you set up for EC2.
I think it is enabled by default unless you explicitly disable it.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html

I don't think there is a need for an instance to explicitly access the metadata endpoint.

エキスパート

回答済み 1年前

AWS
エキスパート

レビュー済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ