Other than creating the IAM role, I think it would be great to add something about the AMI, or maybe even allow providing it as an environment variable. I edited the code and hardcoded the AMI for eu-west-1.
Also, would you be interested in a PR that wraps it up in a Docker image? I can also add a script for creating the SSMInstanceProfile IAM role (and policy).