aws eb cli 3 为错误的帐户设置应用程序 [英] aws eb cli 3 sets up application for wrong account

查看:19
本文介绍了aws eb cli 3 为错误的帐户设置应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个 AWS 账户,我正在尝试弹性 beanstalk EB CLI 3 的新命令行界面.当我运行以下命令 eb init 时,我收到了区域提示(好)然后它要求我选择要使用的应用程序",其中列出了另一个 AWS 账户中的应用程序(用于暂存).如果我继续创建新应用程序",该应用程序将在我的临时帐户中创建.

I have multiple AWS accounts and I'm trying out the new command line interface for elastic beanstalk EB CLI 3. When I run the following command eb init I get prompted for the region (good) and then it asks me to "Select an application to use" where it lists the applications from another AWS account (for staging). If I go ahead and "Create new application" that application will be created in my staging account.

有没有办法配置 eb cli3 并让它使用不同的访问密钥?

Is there some way to configure eb cli3 and get it to use different access keys?

推荐答案

您可以设置新配置文件 以与 EB CLI 一起使用.配置文件在 AWS CLI 和 EB CLI 之间共享.

You can set up a new profile to use with the EB CLI. Profiles are shared between the AWS CLI and the EB CLI.

打开您的 aws 配置文件:~/.aws/config 并添加以下几行:

Open up your aws config file: ~/.aws/config and add the following lines:

[profile profilename]
aws_access_key_id = aaaaaa
aws_secret_access_key = aaaaaaaaa123

然后你可以调用eb init --profile profilename.这将设置 EB CLI 以对该特定目录使用该特定配置文件.

Then you can call eb init --profile profilename. This will set up the EB CLI to use that specific profile for that specific directory.

这篇关于aws eb cli 3 为错误的帐户设置应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆