1. Make a CloudFront distribution after that configure the Amazon EC2 instance as origin
2.Register the Amazon EC2 instance by creating a load balancer.
3.Make an Auto Scaling group from the instance using the CreateAutoScalingGroup action
4.Make a launch configuration from the instance using the CreateLaunchConfiguration action