A simple example to get started on GitHub Actions with AWS
OpenID Connect (rather than AWS Secrets) is used to authenticate to AWS resources, so no secrets are stored in the GitHub repository.
When an issue is opened, a Security Group (along with an ingress rule) and an EC2 instance are created.
Both of these resources are tagged with the pair actor:${{ github.actor }}-${{ github.event.issue.number }}.
When an issue is closed, the Security Group and EC2 Instance are located and terminated by using the tag.
- Configure AWS Credentials step 1 to 3. For permission policy, attach
AmazonEC2FullAccess - Fork this repository, edit the Role ARN and AWS Region in the workflow files
- Open/close an issue