Good day lovely people. :)
I have a question.
Please how does one run/test their cloudformation template without actually deploying the resources?
I ask this because running the template would incur charges if one wanted to see if it passed.
Thanks.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (7)
You can use tools like cfn-lint and cfn-nag to do some sanity checks. Also reviewing the change set before applying an update to a stack. But in the end there will be things that are only checked at runtime by cloudformation and you cannot avoid it completely to get charged,
That being said, work in small increments snd updates and do not put too many things in the same stack will help to avoid too msny repeated charges and wasted time during developmrnt.
Something like AWS CDK can also speed up development and avoid some low-level mistakes, as it tries to package many resouces in a way more easy to handle, assuming you are fsmiliar with any of the programming languages supported.
Hello thanks a lot for this. I was also thinking about running tests using cfnlint. I heard from someone that I could use localstack which would deploy locally, confirm if the template deployed all the resources properly and would not incur charges. True?
Localstack may help to some extent for sure, although probably not catch all issues.
I would expect service limit issues and regional differences perhaps not getting caught, and any timing related issue as well.
But I have not used localstack recently, so not sure about the current quality of the emulation.
I think more of the value may come from faster feedback loop rather than resource cost.
I.e. it may reduce the cost of your time more than the cost of AWS resources -which is valuable.
Thanks so much for jumping in here!
@nvsblmike was this helpful for you?
The AWS CloudFormation designer tool can help validate templates to a certain degree and help you understand if it's a valid or not.
As far as I understand it doesn't quite test deployment logic etc but it gives you some idea of what will happen if you run the template.
I knew you knew more than I do!
I don't have the answer to your question @nvsblmike but maybe @cloudyadvice @eriklz @techielass or @daknhh does?