AWS CF template deploy from S3 bucket

Hi,
Using the built in Template to deploy AWS CloudFormation template, can we deploy the stack using a template that is uploaded to S3 bucket instead of locally?
I understand that there is an option to use AWS CLI, but can you please advise if we can use the built in step to do this or other better idea to device this?

For e.g. it would be also good if i can get a script that the AWS CF template does under the hood which I can then implement in the AWS CLI.

Hi,

Unfortunately the built-in step does not support S3, but there is https://library.octopus.com/step-templates/d6d9d9db-e4ab-487c-967c-860bf8303052/actiontemplate-aws-create-cloud-formation-stack community step. I haven’t tried it, but looking at the properties it supports it seems to support s3.

Also regarding the s3 option in the out of the box template, I have created https://github.com/OctopusDeploy/Issues/issues/5089 that you can track, I can’t commit to a time frame when it will be done, sorry!

I hope I have provided enough information, let me know.

Regards
John

Thanks John for your response.
Can you please let me know if there is any way I can get hold of the underlying script of the default AWS step template for “Deploy an AWS Cloudformation Template” ?

With your suggestion, I have few challenges. It doesnt accept a package that could be deployed. Instead expects to put parameter values directly inside the body.
How can we configure AWS account in the step (instead of access key and secret key) ?

Hi Pratik,

The default AWS CloudFormation step can be found here, but as you can see it is not exposed as a script. This means that you will not be able to manipulate the step using scripting.

In regards to community steps and accounts, we have some known issues around binding the accounts here and here. You should be able to provide the access key and secret key as part of the parameters using the following bindings:

#{AwsAccount.AccessKey}
#{AwsAccount.SecretKey}

I managed to get this to work with a custom library template, however did not have much success using the CloudFormation community template as is. I have therefore included a modified version of the community template which allows you to bind the AWS account direct. You can import the contents of this file by navigating to Library -> Step Templates and clicking on the Import button.

Custom Template:
cf-custom.json (13.0 KB)

Hope that helps!

Regards,
Shaun