AWS Classroomnotes 30/Mar/2023

Creating ec2 instance using Cloudformation

  • We will be installing apache server in ubuntu 22.04
  • Things to be created
    • Security group with 22 and 80 port opened to all. Refer Here for the changes done
  • Things to be figured out
    • AMI id of ubuntu22.04:
    • key pair to be passed
    • instance type to passed
    • subnet in which ec2 instance has to be created
  • Lets create ec2 based on Refer Here cloudformation spec
  • Refer Here for the changes done.
  • This created an ec2 instance but it didn’t had public ip address
    Preview
  • Make necessary changes in the template to associate public ip address Refer Here for the changes
    Preview
  • Lets try logging into machine.
    Preview
  • The ssh connection is timed out the reason for that is vpc is private.
  • To give internet connectivity to vpc
    • create and attach internet gateway
    • create a route table with route to internet gateway for anywhere (0.0.0.0/0)
    • assoicate this route table to web1 and web2 subnets
  • Refer Here for the changes done
  • Refer Here for functions

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube