Update the order of resolution for aws region and credentials. #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #53.
closes #55.
closes #77.
closes #92.
closes #189
$ make test
coverage: 76.6% of statements
ok github.com/aws/amazon-ecs-cli/ecs-cli/modules/config 5.031s coverage: 76.6% of statements
SETUP
Did a compose up: so that the task definition would print the region and account id in the ARN (so we can extract which region and aws account it talked to)
2 AWS profiles:
NO PROFILE/REGION/CREDENTIALS
3a) Using AWS_PROFILE in ECS Config
Picked from aws-profile "another-test-cli"
3b) AWS_PROFILE env var
Picked from aws-profile "default"
3c) AWS_DEFAULT_PROFILE env var
Picked from aws-profile "test-cli"
2) Use ECS Config
Picked from ecs config, overrode the AWS_PROFILE env var
1) Use env variables
Picked from env var, overrode the ECS Config
Picked from env var, overrode the above env var
4) EC2 Instance Role
// Upon debugging found out that the error was:
EC2RoleRequestError: no EC2 instance role found
caused by: EC2MetadataError: failed to make EC2Metadata request
Next step: launched an instance with ec2 instance role
Next step: attached the policy AmazonEC2ContainerServiceFullAccess to the role
Picked
5) Assume_role
From ~/.aws/config
Next step: added the trust relationship
Picked