AWS DotNet SDK Error: Unable to get IAM security credentials from EC2 Instance Metadata Service
问题 I use an example from here in order to retreive a secret from AWS SecretsManager in c# code. I have set credentials locally via AWS CLI, and I am able to retreive secret list using AWS CLI command "aws secretsmanager list-secrets". But c# console app fails with an error: > Unhandled exception. System.AggregateException: One or more errors occurred. (Unable to get IAM security credentials from EC2 Instance Metadata Service.) ---> Amazon.Runtime.AmazonServiceException: Unable to get IAM