本文介绍了如何使用Elastic Beanstalk CLI更改AWS账户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用弹性beantalk部署了一个应用程序到我的个人AWS帐户.现在,我想更改AWS凭证,以便eb cli知道要部署到其他帐户.但是当我键入"eb init"时,它并没有要求我提供AWS密钥.我在哪里指定?

I deployed an app using elastic beanstalk to my personal AWS account..Now I want to change the AWS credentials so the eb cli knows to deploy to a different account. But it does not ask me for the AWS keys when I type "eb init". Where do I specify this?

推荐答案

我必须向该文件~/.aws/config添加新的配置文件.具有2个配置文件的文件示例:

I had to add a new profile to this file ~/.aws/config. Example of the file with 2 profiles:

[profile eb-cli]
aws_access_key_id = XXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXX

[profile eb-cli2]
aws_access_key_id = XXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXX

还要确保在您的应用程序.elasticbeanstalk/config.yml中更新配置文件值

Also make sure to update the profile value in your application .elasticbeanstalk/config.yml

这篇关于如何使用Elastic Beanstalk CLI更改AWS账户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 14:54