如何为弹性豆秆指定环境名称?

时间:2016-06-30 21:04:39

标签: amazon-web-services elastic-beanstalk amazon-elastic-beanstalk

我正在尝试使用cli部署到弹性beanstalk。

我运行的命令是

 eb create --modules ebtargets/goapi -v

我收到以下错误

WARNING: You have uncommitted changes.
INFO: Getting version label from git with git-describe
INFO: Uploading archive to s3 location: goapi/app-d4ec2-160630_135740.json
Uploading goapi/app-d4ec2-160630_135740.json to S3. This may take a while.
Upload Complete.
INFO: Creating AppVersion app-d4ec2-160630_135740
--- Waiting for application versions to be pre-processed ---
Finished processing application version app-d4ec2-160630_135740
--- Creating modules ---
ERROR: ServiceError - ApplicationVersion app-d4ec2-160630_135740 must specify an environment name in env.yaml

我的env.yaml文件中有密钥EnvironmentName。对此有何帮助?

2 个答案:

答案 0 :(得分:0)

我有类似的问题,我注意到你必须检查你的env.yaml进入版本控制,否则它不会被使用:

git add env.yaml
git commit -m "add elastic beanstalk environment config"

答案 1 :(得分:0)

检查.elasticbeanstalk

中是否有ebtargets/goapi个文件夹

如有必要,请使用eb init --modules ebtargets/goapi

更多信息here