无法使用Git部署到AWS Elastic Beanstalk

时间:2022-06-26 04:22:58

I'm following the Elastic Beanstalk docs (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html) to the letter but I'm unable to deploy either a node.js or PHP application using git.

我正在关注Elastic Beanstalk文档(http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html),但我无法部署node.js或PHP应用程序饭桶。

$ eb push
Error: Failed to create the AWS Elastic Beanstalk application version
Cannot run aws.push for local repository HEAD: 

The same happens if I try to push from git

如果我尝试从git推送,也会发生同样的情况

$ git aws.push
Updating the AWS Elastic Beanstalk environment phpapp-env...
Error: Failed to create the AWS Elastic Beanstalk application version

When you call eb init, the AWS tools setup a few git shortcuts. The call that is failing is...

当您调用eb init时,AWS工具会设置一些git快捷方式。失败的电话是......

$.git/AWSDevTools/aws.elasticbeanstalk.createapplicationversion
Error: Failed to create the AWS Elastic Beanstalk application version

The code for that python modules is...

那个python模块的代码是......

from aws.dev_tools import *

if __name__ == "__main__":
  dev_tools = DevTools()
  dev_tools.create_application_version(None, None)

I've tried this for a brand new php and node.js projects. I'm running Python 2.7.2, Ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin12.0]. Any thoughts?

我已经尝试过这个全新的php和node.js项目了。我正在运行Python 2.7.2,Ruby 2.1.2p95(2014-05-08修订版45877)[x86_64-darwin12.0]。有什么想法吗?

6 个解决方案

#1


10  

We experienced the same error message but different cause. The commit message for our git commit was either too long or contained special characters. Using a simpler git commit message cleared it up. Hope this helps someone!

我们遇到了相同的错误消息,但原因不同。我们的git commit的提交消息要么太长,要么包含特殊字符。使用更简单的git提交消息将其清除。希望这有助于某人!

#2


5  

This bug will only bite people that use multiple AWS accounts. It seems that if you have AWS_CREDENTIAL_FILE declared in your environment variables, the AWS tools will pick that up instead of picking up the local credentials that I established for the Beanstalk project. You can check which configuration is being used by issuing the following command.

此错误只会限制使用多个AWS账户的人。似乎如果您在环境变量中声明了AWS_CREDENTIAL_FILE,那么AWS工具将选择该工具而不是获取我为Beanstalk项目建立的本地凭据。您可以通过发出以下命令来检查正在使用的配置。

git aws.config

tells me that the credentials are coming from...

告诉我,凭据来自......

/Users/a12345/.ec2/CLI_Access_User.iam

...instead of the local environment. I wish the error message had indicated that this was a permissions issue.

......而不是当地的环境。我希望错误消息表明这是一个权限问题。

#3


2  

This happened to me when I ran out of application versions, there is a limit of 500

当我用完应用程序版本时,发生了这种情况,限制为500

#4


0  

I have another possible cause for this error, and debugging I got this:

我有另一个可能的原因导致此错误,调试我得到了这个:

{"Error":
    {"Code":"TooManyApplicationVersionsException",
     "Message":"You cannot have more than 500 Application Versions. Either remove some Application Versions or request a limit increase.",
     "Type":"Sender"},
"RequestId":"xxxxxxxx-8184-11e4-xxxx-d5d8eef7a812"}

Definitely the AWSDevTools, should throw those errors being more informative than Error: Failed to create the AWS Elastic Beanstalk application version or even provide a --verbose option.

肯定是AWSDevTools,应该使这些错误比错误信息更丰富:无法创建AW​​S Elastic Beanstalk应用程序版本甚至提供--verbose选项。

#5


0  

Solution is here: Amazon Elastick BeanStalk error: Failed to create the AWS Elastic Beanstalk application version

解决方案如下:Amazon Elastick BeanStalk错误:无法创建AW​​S Elastic Beanstalk应用程序版本

Genrelly too many version uploaded to amazon.

Genrelly太多版本上传到亚马逊。

#6


0  

The above can work for someone but if you still find issues please do check your git aws.config, because if you are working on multiple Beanstalk with multiple accounts try checking if this correct.

以上内容适用于某人,但如果您仍然发现问题,请检查您的git aws.config,因为如果您正在处理多个帐户的多个Beanstalk,请尝试检查这是否正确。

#1


10  

We experienced the same error message but different cause. The commit message for our git commit was either too long or contained special characters. Using a simpler git commit message cleared it up. Hope this helps someone!

我们遇到了相同的错误消息,但原因不同。我们的git commit的提交消息要么太长,要么包含特殊字符。使用更简单的git提交消息将其清除。希望这有助于某人!

#2


5  

This bug will only bite people that use multiple AWS accounts. It seems that if you have AWS_CREDENTIAL_FILE declared in your environment variables, the AWS tools will pick that up instead of picking up the local credentials that I established for the Beanstalk project. You can check which configuration is being used by issuing the following command.

此错误只会限制使用多个AWS账户的人。似乎如果您在环境变量中声明了AWS_CREDENTIAL_FILE,那么AWS工具将选择该工具而不是获取我为Beanstalk项目建立的本地凭据。您可以通过发出以下命令来检查正在使用的配置。

git aws.config

tells me that the credentials are coming from...

告诉我,凭据来自......

/Users/a12345/.ec2/CLI_Access_User.iam

...instead of the local environment. I wish the error message had indicated that this was a permissions issue.

......而不是当地的环境。我希望错误消息表明这是一个权限问题。

#3


2  

This happened to me when I ran out of application versions, there is a limit of 500

当我用完应用程序版本时,发生了这种情况,限制为500

#4


0  

I have another possible cause for this error, and debugging I got this:

我有另一个可能的原因导致此错误,调试我得到了这个:

{"Error":
    {"Code":"TooManyApplicationVersionsException",
     "Message":"You cannot have more than 500 Application Versions. Either remove some Application Versions or request a limit increase.",
     "Type":"Sender"},
"RequestId":"xxxxxxxx-8184-11e4-xxxx-d5d8eef7a812"}

Definitely the AWSDevTools, should throw those errors being more informative than Error: Failed to create the AWS Elastic Beanstalk application version or even provide a --verbose option.

肯定是AWSDevTools,应该使这些错误比错误信息更丰富:无法创建AW​​S Elastic Beanstalk应用程序版本甚至提供--verbose选项。

#5


0  

Solution is here: Amazon Elastick BeanStalk error: Failed to create the AWS Elastic Beanstalk application version

解决方案如下:Amazon Elastick BeanStalk错误:无法创建AW​​S Elastic Beanstalk应用程序版本

Genrelly too many version uploaded to amazon.

Genrelly太多版本上传到亚马逊。

#6


0  

The above can work for someone but if you still find issues please do check your git aws.config, because if you are working on multiple Beanstalk with multiple accounts try checking if this correct.

以上内容适用于某人,但如果您仍然发现问题,请检查您的git aws.config,因为如果您正在处理多个帐户的多个Beanstalk,请尝试检查这是否正确。