Passer au contenu

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?

demandé il y a un an136 vues

1 réponse
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

répondu il y a un an

AWS
EXPERT

vérifié il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.