Limitations:
Things I tried:
Any advice on best practices about how to do that?
Update: To clarify the question: My problem is to find a common way to provide aws credentials to both on development environment and production both using docker. By"I used IAM roles but this works only on prod" I meant I used taskRoleArn on cloudformation task definition but this only effects the prod not development environment. So I need to set credentials another way (like aws config) on development environment.
For anyone interested I solved my problem by following instructions here about testing IAM roles: https://aws.amazon.com/blogs/compute/a-guide-to-locally-testing-containers-with-amazon-ecs-local-endpoints-and-docker-compose/ See the section related to "ECS Local Container Endpoints"