0

I am building two websites using two different AWS Accounts in my Windows 64-bit PC. I have deployed a website successfully from my first account. Now when I go to deploy from the second account, the application gets created in the first account.

.aws/config

[profile eb-cli]
aws_access_key_id =  1st-user-access-key-id
aws_secret_access_key = 1st-user-secret-access-key
region = us-west-2
output = json


[profile user1]
aws_access_key_id = 2nd-user-access-key-id
aws_secret_access_key = 2nd-user-secret-access-key
region = us-west-2
output = json

I have deployed my website from the user eb-cli. Now even after using the code setx AMAZON_PROFILE user1 if I try to create an application in my user1 account, it gets deployed in the eb-cli user's account.

How do I switch between accounts?

Deepjyoti De
  • 117
  • 1
  • 11

1 Answers1

1

Per the eb-cli documentation you need to specify an AWS_EB_PROFILE environment variable, or use the --profile command line option.

I'm not aware of anything that uses AMAZON_PROFILE. Most AWS tools like the AWS CLI and the AWS SDKs use AWS_PROFILE.

Mark B
  • 183,023
  • 24
  • 297
  • 295