GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - t2yijaeho/Custom-AMI-EC2-with-CloudFormation: Custom AMI EC2 with CloudFormation

BranchesTags
Open more actions menu

Latest commit

 

History

44 Commits
44 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
Scripts
Scripts
 
 
Template
Template
 
 
images
images
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Custom AMI Amazon EC2 with AWS CloudFormation

1. Launch AWS CloudShell

  • Refer to AWS CloudShell

2. Create an Amazon EC2

1. Get an AWS CloudFormation stack template body

wget https://github.com/t2yijaeho/Custom-AMI-EC2-with-CloudFormation/raw/matia/Template/EC2-MigVM.yaml
  • For Spot instance
wget https://github.com/t2yijaeho/Custom-AMI-EC2-with-CloudFormation/raw/matia/Template/EC2-MigSpot.yaml

2. Get your local machine public IP address in the browser

  • Your public IP address

3. Create an AWS CloudFormation stack

  • Change <My Custom Image ID> to your Custom Amazon Machine Image ID

  • Change <My IP> to your local machine IP address (ParameterValue must be in CIDR block)

aws cloudformation create-stack \
    --stack-name MigrationVM \
    --template-body file://./EC2-MigVM.yaml \
    --parameters ParameterKey=CustomImageID,ParameterValue="<My Custom Image ID>" \
    ParameterKey=LocalLocation,ParameterValue="<My IP>/32"
aws cloudformation create-stack \
    --stack-name MigrationVM \
    --template-body file://./EC2-MigSpot.yaml \
    --parameters ParameterKey=CustomImageID,ParameterValue="<My Custom Image ID>" \
    ParameterKey=LocalLocation,ParameterValue="<My IP>/32"

4. AWS CloudFormation returns following output

{
"StackId": "arn:aws:cloudformation:us-abcd-x:123456789012:stack/MigrationVM/b4d0f5e0-d4c2-11ec-9529-06edcc65f112"
}

5. Monitor the progress by the stack's events in AWS management console

About

Custom AMI EC2 with CloudFormation

t2yijaeho.github.io/Custom-AMI-EC2-with-CloudFormation

Topics

awscloudformationec2

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.