https://techtalkbook.com/aws-from-creating-instance-ami-to-updating-auto-scaling-group-shell-script/
AWS: From creating instance AMI to updating Auto Scaling group at once using shell script