Simple code deploy application.
One for EC2 and one for EC2 to S3.
Get your instance ready to go and create a snapshot. Ensure you are the only one that can ssh by restricting IP address and whatnot.
For this application, it would be good to name <AppName> and create the following "Deployment Group Name"s:
- Testing
- Staging
- Production
Also, connect to GitHub.
Create a CodeDeploy<AppName> policy following the aws/policy_template.json.
The user should probably be something like GitHub<AppName>. Store the AWS access key and secret access key in a safe place. If you lose them, you can always create new ones and expire the old ones.
Go to the following and create a token repo:status and repo_deployment. Copy this token for the next step.
Got to GitHub > "your project" > Settings > Integrations & services and add the configurations from above.
In Integrations & services add GitHub Auto-Deployment and configure as desired.