Running aws ec2 describe-subnets --filters="Name=vpc-id,Values=vpc-1010101" --profile staging
Shows my 3 subnets, but if I drop the --profile I see no subnets at all.
cat ~/.aws/config
[default]
region = eu-central-1
[profile staging]
role_arn = arn:aws:iam::1010101010101:role/FullAccessStaging
source_profile = default
region = eu-central-1
If I run docker-machine create
and drop the --profile staging
Error setting machine configuration from flags provided: The desired subnet could not be located in this region. Is '--amazonec2-subnet-id' or AWS_SUBNET_ID configured correctly?
Yes - this subnet is not in this region - in the main aws account - it only appears in the staging profile.
How can I specify the --profile - the way I do with all other aws cli commands?
I want to create a machine in an existing subnet:
Running
aws ec2 describe-subnets --filters="Name=vpc-id,Values=vpc-1010101" --profile staging
Shows my 3 subnets, but if I drop the--profile
I see no subnets at all.cat ~/.aws/config
If I run
docker-machine create
and drop the--profile staging
Error setting machine configuration from flags provided: The desired subnet could not be located in this region. Is '--amazonec2-subnet-id' or AWS_SUBNET_ID configured correctly?
Yes - this subnet is not in this region - in the main aws account - it only appears in the staging profile.How can I specify the
--profile
- the way I do with all other aws cli commands?