AWS SDK provides easy way to switch profiles for local development programmatically if you are using non-default profile
for your application.
Problem may appear in different ways
- Problem Connecting to DynamoDb: Unable to load AWS credentials from any provider in the chain OR
- Unable to find Resource
If you are using default profile for your local environment, you can use below code.
If you are using non default profile for your local environment, you can use below code.
In below code, development is the profile name. It means that in you ~/.aws/credentials, you should have
development as configured profile with keys and credentials