title: What's the best way to upload local file to instance using Cloudformation?
body: <p>In this case, I am trying to copy the .pem file to the bastion host. But if I wanted to simply copy a file on my local machine to the instance, what's the best way to achieve this?</p>
  
  <p>In terraform, this can be done with a  provisioner file. Is there something similar for cloudformation></p>
  
  <p>I have tried to use the "file" for example:</p>
  
  <pre><code>"Metadata":{
  "AWS::CloudFormation::Init": {
  "files" : {
  </code></pre>
  
  <p>but I am unsure how to use this to copy file.
  Do you have suggestions?</p>