AWSSecretsManagerConfigurationExtensions icon indicating copy to clipboard operation
AWSSecretsManagerConfigurationExtensions copied to clipboard

Unable to get IAM security credentials from EC2 Instance Metadata Service

Open dat0609 opened this issue 3 years ago • 1 comments

How can use AWS secret when I deploy into production. I'm using .net6 and used docker to deploy into azure but in production, I got the error "Unable to get IAM security credentials from EC2 Instance Metadata Service" I'm adding credentials for AWS secret manager. It works when I change the environment variable to production but does not work when I deployed

I have tried 6 samples but nothing works for me

When I use Basic credentials I got

Amazon.Runtime.AmazonServiceException: Unable to get IAM security credentials from EC2 Instance Metadata Service.

I also add IAM full access to that user role

When I use StoredProfileAWSCredentials I got

App.config does not contain credentials information. Either add the AWSAccessKey and AWSSecretKey properties or the AWSProfileName property.

dat0609 avatar May 17 '22 06:05 dat0609

Hi! Since you're running your container in Azure, I guess you'll need to use a fully flashed out user to authorize your calls towards AWS.

I'd consider putting the keys into whatever secure storage Azure offers and use them as environment variables in the container.

Kralizek avatar May 17 '22 08:05 Kralizek