Coder Social home page Coder Social logo

aws-private-ha-app-setup's Introduction

aws-private-ha-app-setup

This template will deploy a VPC which contains two public subnets (using an Internet Gateway) and two private subnets. There are also two EC2 applications created which are hosted in private subnets in different Availability Zones (HA). The EC2's will check when the NAT Gateway is working and install + host an Apache server. There EC2s were able to download the httpd package from the internet by using that NAT Gateway. Also an additional EC2 is created in a public subnet (public IP) to make this EC2 reachable from the internet. This EC2 will serve as bastion host. It is possible to SSH inside the bastion host and connect from there to the private EC2 instances which are hosting the basic website.

Prerequisites

  • Create a key pair on AWS and define this key pair in your parameters.json
  • Define parameters in parameters.json

Create stack

Create stack using AWS CLI:

$ aws cloudformation create-stack --stack-name vpc-demo --template-body file://template.yaml --parameters file://parameters.json 

Diagram

foto1

Resources

Resources created in initial ChangeSet: screen shot 2018-11-13 at 18 43 12

Test application environment

blur1

  • Test LB by turning of an EC2 instance.
  • SSH to Bastion Host
$ ssh-add -K demo-key.pem
Identity added: demo-key.pem (demo-key.pem)
# SSH to Public IP of bastion host
$ ssh -A [email protected] 
  • SSH from inside Bastion Host to private application instances
# SSH from Bastion host to private instances
$ ssh [email protected]
$ exit
$ ssh [email protected]
$ exit

aws-private-ha-app-setup's People

Contributors

lvthillo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.