1 回答
- 最新
- 投票最多
- 评论最多
0
Hello rePost-User-9225202, thank you for reaching out!
It appears you are encountering an issue related to IAM security credentials on SDK. The error suggest the problem that the IAM trust policy might not be correctly configured.
Make sure your IAM trust policy allow allows the EC2 instance to assume the role. Check the example below.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "Service": "ec2.amazonaws.com"},
"Action": "sts:AssumeRole"
}
]
}
If you are performing these call within a EC2 instance check this link https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#instance-metadata-security-credentials.
Somebody also ask a similar question over Github(https://github.com/aws/aws-sdk-net/issues/1699). Check the link to see if you can resolve your issue over there.
Hope this helps.
Reference:
https://blog.gruntwork.io/authenticating-to-aws-with-instance-metadata-b6d812a86b40
已回答 8 个月前
相关内容
- AWS 官方已更新 8 个月前