Looking at the AWS sdk for Javascript, it appears we can only create stacks
but i'm looking of a way to deploy
a stack. How would I do that with the provided sdk; this is what they currently have:
cloudformation.createStack(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
I was hoping for something like this:
cloudformation.deployStack(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Basically, I would like to recreate this command using the sdk instead of the cli:
aws cloudformation deploy --template-file /path_to_template/template.json --stack-name my-new-stack --parameter-overrides Key1=Value1 Key2=Value2 --tags Key1=Value1 Key2=Value2
And this is because I use Linux and can put this in a shell script while most of the people I work with all use Windows and I don't want to use Windows Batch but instead a cross platform solution like npm and thus the aws-sdk for javascript approach
.
How would you perform the cloudformation.deployStack
using the SDK
and NOT
the CLI ?