Code Monkey home page Code Monkey logo

cdk-3ta's Introduction

CDK-3TA

CDK example on how to build a Web 3 Tier Architecture. It is an example for training purpose DON'T USE IT IN PRODUCTION. Project's location: https://github.com/rluberti/CDK-3TA/

Introduction

The AWS Cloud Development Kit (AWS CDK) is an open source software development framework to define your cloud application resources using familiar programming languages (see https://aws.amazon.com/cdk/). This project is a basic example in Python on how to create a classic Web 3 Tier Architecture (Web / App / DB Tiers, see https://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture).

Features

Architecture

Installation

Requirements

Steps

  • Clone repository
  • git clone https://github.com/rluberti/CDK-3TA.git
  • Create Python Virtual Environment
  • cd CDK-3TA
  • python3 -m venv .venv
  • Run Virtual Environment
  • source .venv/bin/activate
  • Install Python packages
  • pip3 install aws-cdk.aws-codedeploy aws-cdk.aws-rds
  • Check if CDK can create CloudFormation code running:
  • cdk synth
  • Create Stack deploying the code on AWS CloudFormation:
  • cdk deploy
  • It will display the Web public DNS entry point as "CDK-3TA-Stack.WebALBDNS"
  • Delete Stack
  • cdk destroy

Usage

  • Use http://<CDK-3TA-Stack.WebALBDNS>/ to hit the Web tier only and get its output
  • Use http://<CDK-3TA-Stack.WebALBDNS>/app to hit Web tier first, then App tier and get its ouput
  • Use http://<CDK-3TA-Stack.WebALBDNS>/db to hit Web tier first, App tier second and DB tier at the end with its output
  • Connect via SSM session to any EC2 instance and run utility stress --cpu 2 to make total CPU utilization spike to over 40% and trigger scaling up to 4 instances.

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.