Code Monkey home page Code Monkey logo

infrastructure's Introduction

AWS Infrastructure Stack - Cloud Formation

Here what you need to do for networking infrastructure setup:

Post Installation Step

  1. Install and setup AWS command line interface. (Refer:- https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).

  2. Configure your aws profile using the following command:

$ aws configure --profile produser
AWS Access Key ID [None]: <AccessID>
AWS Secret Access Key [None]: <AccessKey>
Default region name [None]: <region>
Default output format [None]: 

Steps to create AWS Infra Stack

  1. Create CloudFormation template networking.json or networking.yaml that can be used to setup required networking resources.

  2. Create Cloud formation Stack using the following command:

$ aws cloudformation create-stack \
  --stack-name csye6225demo \
  --parameters ParameterKey=InstanceTypeParameter,ParameterValue=value \
  --template-body file://networking.json
  1. To Delete Cloud formation Stack use the following command.
$ aws cloudformation delete-stack --stack-name csye6225demo 

Variables provided in CLI

Template Name,  
AWS Region,  
VPC Name,  
VPC CIDR,  
Subnet1 CIDER,  
subnet2 CIDER,  
subnet3 CIDER,  
name of the JSON file

Networking setup

  1. Create a VPC(vpc)
  2. Three subnets created in the VPC
  3. Internet gateway, along with Internet gatewayVPC attachment
  4. Public Route table along with all the subnets attached to this table
  5. Public Route in the public Router table with destination CIDR block 0.0.0.0/0 and internet gateway created as target.

Import Ceritificate Using AWS CLI

The following example shows how to import a certificate using the AWS Command Line Interface (AWS CLI). The example assumes the following:

  1. The PEM-encoded certificate is stored in a file named Certificate.pem. Use the following command to export your .crt or.cert file into .pem file
openssl x509 -in <youCrtFile>.crt -out <youCertName>.pem
  1. The PEM-encoded certificate chain is stored in a file named CertificateChain.pem. Use the following command to export your .ca-bundle file into .pem file
openssl x509 -in <yourCaBundleFile>.ca-bundle -out <yourCertChainName>.pem
  1. The PEM-encoded, unencrypted private key is stored in a file named PrivateKey.pem.

  2. THe following command imports the certificate to Amazon Certificate Manager.

$ aws acm import-certificate --certificate file://<youCertName>.pem --certificate-chain file://<yourCertChainName>.pem --private-key file:/<yourPrivateKey>.pem
  	

infrastructure's People

Contributors

rishijatania 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.