如何从 aws-sdk 中的 s3 存储桶创建 Elastic Beanstalk 实例?
How to create Elastic Beanstalk instance from s3 bucket in the aws-sdk?
我正在尝试从 aws javascript sdk 部署一个弹性 beantalk 实例,并希望代码源来自 s3 存储桶。我可以看到您可以通过网络界面执行此操作,但无法通过 sdk 弄明白。
到目前为止,我有以下内容创建了一个新环境(此时应用程序已经存在)但是环境没有 运行.
的源代码
const elasticBeanstalkClient = new ElasticBeanstalkClient({
region: "eu-west-2",
credentials: {
accessKeyId: awsAccessKeyId,
secretAccessKey: awsAccessKeySecret
}
});
const createEnvironmentCommand = new CreateEnvironmentCommand({
ApplicationName: applicationName,
EnvironmentName: environmentName,
SolutionStackName: "64bit Amazon Linux 2 v5.4.2 running Node.js 14",
VersionLabel: versionLabel
})
return elasticBeanstalkClient.send(createEnvironmentCommand);
CreateEnvironmentCommand
似乎没有我可以看到的源值。我应该如何告诉要从 s3 源创建的环境?
I can see you can do this via the web interface but can't figure it out via the sdk.
EB 控制台在后台做了很多事情,让您看起来可以做到。使用 CDK,您必须自己做所有事情。这意味着您必须先 createApplicationVersion。执行此操作时,您可以指定 S3 位置。
我正在尝试从 aws javascript sdk 部署一个弹性 beantalk 实例,并希望代码源来自 s3 存储桶。我可以看到您可以通过网络界面执行此操作,但无法通过 sdk 弄明白。
到目前为止,我有以下内容创建了一个新环境(此时应用程序已经存在)但是环境没有 运行.
的源代码const elasticBeanstalkClient = new ElasticBeanstalkClient({
region: "eu-west-2",
credentials: {
accessKeyId: awsAccessKeyId,
secretAccessKey: awsAccessKeySecret
}
});
const createEnvironmentCommand = new CreateEnvironmentCommand({
ApplicationName: applicationName,
EnvironmentName: environmentName,
SolutionStackName: "64bit Amazon Linux 2 v5.4.2 running Node.js 14",
VersionLabel: versionLabel
})
return elasticBeanstalkClient.send(createEnvironmentCommand);
CreateEnvironmentCommand
似乎没有我可以看到的源值。我应该如何告诉要从 s3 源创建的环境?
I can see you can do this via the web interface but can't figure it out via the sdk.
EB 控制台在后台做了很多事情,让您看起来可以做到。使用 CDK,您必须自己做所有事情。这意味着您必须先 createApplicationVersion。执行此操作时,您可以指定 S3 位置。