无法使用Git部署到AWS Elastic Beanstalk


Unable to deploy to AWS Elastic Beanstalk using Git

我遵循Elastic Beanstalk文档(http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html)的信,但我无法使用git部署node.js或PHP应用程序。

$ eb push
Error: Failed to create the AWS Elastic Beanstalk application version
Cannot run aws.push for local repository HEAD: 
如果我尝试从git 推送,也会发生同样的情况
$ git aws.push
Updating the AWS Elastic Beanstalk environment phpapp-env...
Error: Failed to create the AWS Elastic Beanstalk application version

当你调用ebinit时,AWS工具会设置一些git快捷方式。失败的调用是…

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

python模块的代码是…

from aws.dev_tools import *
if __name__ == "__main__":
  dev_tools = DevTools()
  dev_tools.create_application_version(None, None)

我已经尝试了一个全新的php和node.js项目。我正在运行Python 2.7.2, Ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin12.0]。任何想法吗?

我们遇到了相同的错误消息,但原因不同。git提交的提交消息要么太长,要么包含特殊字符。使用一个更简单的git提交消息就解决了这个问题。希望这对大家有所帮助!

此漏洞只会影响使用多个AWS账户的用户。看起来,如果您在环境变量中声明了AWS_CREDENTIAL_FILE, AWS工具将获取它,而不是获取我为Beanstalk项目建立的本地凭据。您可以通过发出以下命令来检查正在使用哪个配置。

git aws.config

告诉我凭证来自…

/Users/a12345/.ec2/CLI_Access_User.iam

…而不是当地的环境。我希望错误消息指出这是权限问题。

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

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

{"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"}

绝对是AWSDevTools,应该抛出这些错误比Error: Failed to create the AWS Elastic Beanstalk application version更有信息,甚至提供--verbose选项

解决方案如下:Amazon Elastick BeanStalk错误:Failed to create the AWS Elastic BeanStalk应用程序版本

一般上传到amazon的版本太多了

以上可以为某些人工作,但如果您仍然发现问题,请检查您的git法律。如果您使用多个帐户在多个Beanstalk上工作,请尝试检查是否正确。