if I have a AWS CloudFormation template using UserData block containing script block to be executed, for example:
"UserData": {
"Fn::Base64": {
"Fn::Join": [
"",
[
"#!/bin/bash\n",
"apt-get update\n",
"apt-get -y upgrade\n",
]
]
}
}
After the instance is created,
- I assume that this script block will be saved somewhere to be execute?
- If so, where can I find this script on the EC2 instance?
- Will AWS remove this temporary script after stack is created successfully?
I could not find they mention in the doc.
Thanks