Salta al contenuto

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?

posta un anno fa136 visualizzazioni

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

ESPERTO

con risposta un anno fa

AWS
ESPERTO

verificato un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.