|||

AWS VPC Notes

VPC logo

Create VPC with 2 public subnets

  • Services > VPC > Launch VPC Wizard > Single public subnet.

  • Provide IPv4 CIDR block for the entire VPC. All resources within that VPC will assume IP addresses in the specified range. A typical range is [ 10.0.0.0/16 ]

  • Provide IPv4 CIDR block for the public subnet. A typical range for a single AZ subnet is [ 10.0.0.0/24 ].

    Note: - If the public subnet is to be divided into 2 say for AZ a and b then a typical range for subnet A would be [10.0.0.0/25] and [10.0.0.128/25] for subnet B

  • Create a private subnet with CIDR [ 10.0.1.0/24 ] for single AZ subnet.

  • After VPC is created, it is not public yet. It doesnt know how to connect to the internet. So modify its route table to connect it to IGW (internet gateway).

  • Open VPC route table and Add a new route with destination 0.0.0.0/0 and Target to igw-guid. This is the default IGW provided by AWS.

Create EC2 instance

  • Launch EC2 wizard and select desired AMI
  • Network = VPC create above + subnet = a or b
  • Autoassign public IP = disable for now
  • Add EBS
  • Add Name Tag
  • Create new security group, if one doesnt exit already.
  • Open SSH port from source anywhere (in future we can whitelist only certain IPs)
  • Open Custom TCP for application exposed port number to anywhere, so it is publically accessible.
  • Create keypair and store it locally securely.
  • Create and assign an Elastic IP (public ip address), so that we can SSH into the box. Elastic IPs are indepdent of the ec2 instances they are associated with. If the ec2 instance dies, elastic ip can be resued
  • Once elastic IP is created, run app on port 3000 and use Public ip with port 3000 to view in a browser
Up next Building and Deploying apps using VSTS and HockeyApp - Part 3 : Windows Phone Apple Push Notifications With Amazon SNS
Latest posts Flutter CI/CD with Azure Devops & Firebase - iOS - Part 1 Flutter CI/CD with Azure Devops & Firebase - Android - Part 2 How to samples with AWS CDK A hashicorp packer project to provision an AWS AMI with node, pm2 & mongodb Some notes on Zeebe (A scalable process orchestrator) Docker-Compose in AWS ECS with EFS volume mounts Domain Driven Design Core Principles Apple Push Notifications With Amazon SNS AWS VPC Notes Building and Deploying apps using VSTS and HockeyApp - Part 3 : Windows Phone Building and Deploying apps using VSTS and HockeyApp - Part 2 : Android Building and Deploying apps using VSTS and HockeyApp - Part 1 : iOS How I diagnosed High CPU usage using Windbg WCF service NETBIOS name resolution woes The troublesome Git-Svn Marriage GTD (Getting things done) — A simplified view Javascript Refresher Sharing common connection strings between projects A simple image carousel prototype using Asp.net webforms and SignalR Simple logging with NLog Application logger SVN Externals — Share common assembly code between solutions Simple async in .net 2.0 & Winforms Clean sources Plus Console 2 — A tabbed console window