简体   繁体   中英

Unable to deploy to AWS Elastic Beanstalk using Git

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.

$ 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 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...

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

The code for that python modules is...

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?

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!

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.

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.

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

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.

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

Genrelly too many version uploaded to amazon.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM