Question:
I’m trying to set up elasticsearch s3 snapshots on my ec2 instances. And it fails with following error:
1 2 |
nested: NotSerializableExceptionWrapper[sdk_client_exception: The requested metadata is not found at http://169.254.169.254/latest/meta-data/iam/security-credentials/ |
If I query the metadata server from that ec2 instance, it responses the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
$ curl http://169.254.169.254/latest/meta-data/ ami-id ami-launch-index ami-manifest-path block-device-mapping/ events/ hostname identity-credentials/ instance-action instance-id instance-type local-hostname local-ipv4 mac metrics/ network/ placement/ profile public-keys/ reservation-id security-groups services/ |
So there is no iam section.
How to make iam section available for querying from ec2 instance ?
Answer:
Following meta-data URI will return something if you have the role attached to the given ec2 instance:
http://169.254.169.254/latest/meta-data/iam/security-credentials/
so it looks like you don’t have an IAM role attached. Please verify.