我正在尝试在Elastic Beanstalk中创建一个环境,这是我的代码:
PUT /products/product/un1qu3-1d-b718-105973677e95/_update
{
"script": {
"inline": "ctx._source.state = \"packaged\"",
"lang": "painless"
},
"upsert": {
"id": "un1qu3-1d-b718-105973677e95",
"state": "packaged"
}
}
上述代码成功执行并打印输出如下:
AWSElasticBeanstalk client = AWSElasticBeanstalkClientBuilder.defaultClient();
CreateEnvironmentRequest createEnvironmentRequest = new CreateEnvironmentRequest()
.withApplicationName("MySampleApplicationFour")
.withEnvironmentName("MySampleApplicationFour-env")
.withCNAMEPrefix("MySampleApplicationFour")
.withSolutionStackName("64bit Amazon Linux 2017.03 v2.5.1 running Java 8")
;
CreateEnvironmentResult result = client.createEnvironment(createEnvironmentRequest);
System.out.println(result);
但是当我看到AWS Beanstalk控制台时,它将环境显示为已终止。
这是我的AWS控制台:
有人能告诉我如何在AWS Elastic Beanstalk中创建运行环境吗?
答案 0 :(得分:0)
您只是尝试更改您用于AWSClient构建器的Region,并尝试创建环境。