无法在命令行或管理仪表板中创建AWS弹性Beanstalk环境

时间:2022-08-25 09:28:19

I am trying to deploy a "Hello, world" Rails app (Rails v 5.0.1, Ruby v 2.3.1) to AWS for the purposes of learning about AWS.

我正在尝试将“Hello, world”Rails应用(Rails v5.0.1, Ruby v2.3.1)部署到AWS上,以了解AWS。

I have created an IAM user in the AWS Elastic Beanstalk dashboard, and I've verified that the user has one access ID and secret access key. I've ensured these two credentials are stored in environment variables in my local machine, and for completeness I've also ensured these same values are correct in the ~/.aws/credentials file. I have gone through the steps of creating a new application in the UI, however whenever I click "Create Application", I see the following error at the top of the screen:

我在AWS弹性Beanstalk仪表板中创建了一个IAM用户,并验证了用户有一个访问ID和秘密访问密钥。我已经确保这两个凭据存储在本地机器的环境变量中,为了完整性,我还确保这些相同的值在~/中是正确的。aws /凭证文件。我已经完成了在UI中创建新应用程序的步骤,但是每当我点击“创建应用程序”时,我在屏幕顶部看到如下错误:

Validation Error
Configuration validation exception: AWS Elastic Beanstalk could not communicate with Amazon EC2 to determine whether to create a custom security group for Elastic Load Balancing.

My IAM user is a member of the "AdministratorAccess" and "AWSElasticBeanstalkFullAccess" permissions groups.

我的IAM用户是“AdministratorAccess”和“AWSElasticBeanstalkFullAccess”权限组的成员。

When creating the application, I went through the following steps:

在创建应用程序时,我完成了以下步骤:

1) Selected "Web server environment" in the "Choose environment tier" menu. 2) In the "Create a new environment" menu, I choose "Ruby" as the platform and "Sample Application" under the "Application code" selection.

1)在“选择环境层”菜单中选择“Web服务器环境”。2)在“创建新环境”菜单中,我选择“Ruby”作为平台,“Application code”选项下选择“Sample Application”。

Similarly, when I nagivate to my project directory in the command line, and I run "eb create dev-env", I see the following:

类似地,当我在命令行中对项目目录进行nagivate,并运行“eb create dev-env”时,我看到以下内容:

MacBook-Pro-5:beanstalk richiethomas$ eb create dev-env
WARNING: You have uncommitted changes.
Creating application version archive "app-e4da-170116_145453".
Uploading beanstalk/app-e4da-170116_145453.zip to S3. This may take a while.
Upload Complete.
ERROR: API Call unsuccessful. Status code returned 401

EDIT: The same 401 response is returned even when I have no uncommitted changes.

编辑:同样的401回复即使在我没有未提交的更改时也会返回。

Can anyone illuminate what I'm doing wrong?

有人能指出我做错了什么吗?

1 个解决方案

#1


2  

I know this question was awhile ago but for those looking for the solution to this issue you need to add the following permissions to your IAM account.

我知道这个问题已经有一段时间了,但是对于那些寻找这个问题的解决方案的人来说,您需要向您的IAM帐户添加以下权限。

AWSCodeCommitPowerUser AWSCodeCommitFullAccess

AWSCodeCommitPowerUser AWSCodeCommitFullAccess

#1


2  

I know this question was awhile ago but for those looking for the solution to this issue you need to add the following permissions to your IAM account.

我知道这个问题已经有一段时间了,但是对于那些寻找这个问题的解决方案的人来说,您需要向您的IAM帐户添加以下权限。

AWSCodeCommitPowerUser AWSCodeCommitFullAccess

AWSCodeCommitPowerUser AWSCodeCommitFullAccess