How can I authenticate using IAM for local development of .NET application?

0

I am a federated user that has the security policy that any token generated lasts a maximum of 60 minutes. This makes generating access keys for AWS SDK no possible. I am creating a .NET application which access S3 buckets. If I run the program on a EC2 instance that has proper IAM access to the bucket, the program runs with no issues. Is there a plug or way to authenticate via IAM the script when working on my local machine? This would reduce headaches of spinning up a dev environment on a instnace.

1개 답변
0

When you use the .NET AWS SDK it picks up the credentials on your computer. The SDK looks for a profile named "default". Take a look in your in ~/.aws/credentials, or %USERPROFILE%\.aws\credentials

If that is missing (or possibly named something else) you will have tell you S3 Client which credentials to use.

https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/creds-file.html

답변함 일 년 전
  • I'm not seeing any help for authenticating without aws_access_key and aws_secret_access_key. On the EC2 instance, I can run the program since the instance has a IAM role attached. Keys don't work for local development because my company policy doesn't allow me to generate them.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠