AWS Secret Value - C# .NET Framework 4.8 - Unable to get IAM security credentials from EC2 Instance Metadata Service

0

Hello, I'm trying to retrieve AWS Secret Value inside my .NET C# (.NET Framework 4.8) Application hosted on IIS in a EC2 instance like in the example showed here: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets_cache-net.html

The exception I receive is the following: Exception Details: Amazon.Runtime.AmazonServiceException: Unable to get IAM security credentials from EC2 Instance Metadata Service.

If I try to execute the command from CLI, the secret's are retrieved successfully.

Can someone help please ?

已提問 2 年前檢視次數 8927 次
1 個回答
0

The following GitHub and Stack Overflow sites describe similar errors and may be helpful. [1] [2]

[1] How to troubleshoot "Unable to get IAM security credentials from EC2 Instance Metadata Service."? · Issue #1699 · aws/aws-sdk-net
https://github.com/aws/aws-sdk-net/issues/1699

[2] .net - AWS DotNet SDK Error: Unable to get IAM security credentials from EC2 Instance Metadata Service - Stack Overflow
https://stackoverflow.com/questions/60815037/aws-dotnet-sdk-error-unable-to-get-iam-security-credentials-from-ec2-instance-m

profile picture
mn87
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南