retrieving credentials ec2 instance metadata code example
Example: retrieving credentials ec2 instance metadata
$ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/s3access
$ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/s3access