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 ?

gefragt vor 2 Jahren8930 Aufrufe
1 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen