1 Answers
Could the issue here be one of language? The language around launching, starting or running instances can be a little confusing. The AWS API call to launch instances is run-instances
see https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/run-instances.html
You are, generally correct. Default behaviour is that when an instance is first launched, the sequence of events is broadly as you describe: OS boo, bootstrap script, application start. When an instance is subsequently restarted (i.e. started, but not on the first occasion), then the bootstrap script is not re-executed.
However, user-data
can be configured to be executed on every boot of the instance, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html#user-data-shell-scripts In my opinion (from what I’ve read), this specific configuration is out of scope for the Certified Cloud Architect Associate exam.