I am trying to deploy an elastic beanstalk instance from the aws javascript sdk and want the code source to come from an s3 bucket. I can see you can do this via the web interface but can't figure it out via the sdk.
so far I have the following which creates a new environment (application already exists at this point) but the env has no source code to run.
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 doesn't seem to have a source value that I can see. How am I supposed to tell the environment to be created from an s3 source?