'AWS Credentials in a Docker Desktop deployment
I am working on a .net 6.0 application that will run in an EKS cluster, but I am developing using Docker Desktop and Kubernetes. Whilst I can pass in the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, etc via the Helm Chart as Environment variables the issue I am facing is that I keep seeing The security token included in the request is expired, I can update the values and redeploy but clearly that is a pain to do.
When this is running in EKS it will use IAM Roles etc so isn't an issue but just wondered if anyone has a solution for doing this locally. If I run up the code in VS rather than Docker it picks up the credentials from the aws credentials file and runs (even though I haven't updated the token).
In the code snippet above the environment var is set to local when running in my Docker Desktop Kubernetes.
Any ideas if there is a solution for this?
Solution 1:[1]
Why can’t your create a test user in aws & use its keys & secret for your local test. As it’s user & not role that you need to assume keys & secrets for test user will never be expired.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Manmohan Mittal |

