Skip to content

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?

asked a year ago123 views

1 Answer
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.

EXPERT

answered a year ago

AWS
EXPERT

reviewed a year 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.