Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

pinyoko573/github-actions-ec2-create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Demo GitHub Actions - Creating an EC2 instance

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.

Details

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.

Issue example

Workflows

Instructions

  1. Configure AWS Credentials step 1 to 3. For permission policy, attach AmazonEC2FullAccess
  2. Fork this repository, edit the Role ARN and AWS Region in the workflow files
  3. Open/close an issue

About

Creates and destroys EC2 instance by opening/closing Github issue

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors