<p>I'm afraid you can't. The nested stack files must be in S3 as far as I know. You have a couple of options:</p>

<ol>
<li><p>Have some <strong>automation</strong> in place (e.g. <em>aws-cli</em> + <em>shell script</em>, or better <em>ansible</em>) that when executed will upload all the templates to a designated S3 bucket and then execute the the CloudFormation deployment.</p></li>
<li><p>Use some <strong>templating engine</strong> like <em>Ansible + Jinja</em> or similar that can build a big CFN template from little snippets saved in separate files. With Jinja you can also use loops, lookup variables, etc, to build your final template file. Then again you can use the same <em>Ansible</em> playbook to deploy it. Or do it manually as it will only be a single file.</p></li>
</ol>

<p>Hope that helps :)</p>

CC BY-SA 4.0
2018-10-02T04:52:42.560Z
2018-10-02T04:52:42.560Z
MLu
<p>How and is it possible to use a local file for a CloudFormation stack besides an S3 bucket?</p>

<amazon-web-services><aws-cloudformation>
How can I use a local file for a nested Cloudformation stack?
Dr. Chocolate
# How can I use a local file for a nested Cloudformation stack?

(Asked by: username_0 on 2018-10-02)

How and is it possible to use a local file for a CloudFormation stack besides an S3 bucket?

**Tags:** amazon-web-services, aws-cloudformation


---

## 1 answers

### Answer by username_1 on 2018-10-02. Score: 5

I'm afraid you can't. The nested stack files must be in S3 as far as I know. You have a couple of options:

1. Have some **automation** in place (e.g. *aws-cli* + *shell script*, or better *ansible*) that when executed will upload all the templates to a designated S3 bucket and then execute the the CloudFormation deployment.
2. Use some **templating engine** like *Ansible + Jinja* or similar that can build a big CFN template from little snippets saved in separate files. With Jinja you can also use loops, lookup variables, etc, to build your final template file. Then again you can use the same *Ansible* playbook to deploy it. Or do it manually as it will only be a single file.

Hope that helps :)


---

