Git Product home page Git Product logo

learn-aws's Introduction

Learn Amazon Web Services

My journey following this Reddit post's walkthrough on how to become a Cloud Engineer

I deployed a "Fortune of The Day" web app using AWS and Terraform, architected in three different ways: traditional, microserviced and serverless.

During my journey, I used AWS Free Tier, so most of the costs (not all) of running these labs were on the house. I highly recommend you leverage Free Tier or keep close track of the costs of running this.

Table of Contents

Prerequisites

The architectures

In all architectures, the web app design looks like this:

All architectures...

Traditional

The traditional model serves both the static assets and the fortunes, on the same servers.

This model requires the administration of every piece of the app, from the OS to the application.

Microservices

The microserviced approach splits the static assets and the content in two, serving the static files from S3 and the content from our servers.

This model still requires server administration, but offloads our servers a great deal and keeps our application simpler. Instead of a full-blown web server we only have to write a RESTful API.

Serverless

This is the most interesting of all. Serverless splits static assets and content too, but now the content is served from AWS Lambda, which then talks to DynamoDB.

Serverless design removes all administration tasks and leaves it to the guys at Amazon Web Services.

Usage

  1. Add your domain to Route 53 (howto)
  2. Change to the desired architecture's directory (eg. cd serverless)
  3. Run terraform init
  4. Run terraform apply

Go to https://www.architecture.domain.com (replace architecture with traditional, microservices or serverless) and domain.com with your domain (eg. www.serverless.example.com)

Note: (Serverless only), AWS Lambda files must be world-readable, run chmod 644 src/api/*.py if Lambda throws Permission denied errors.

Destroy

  1. Run terraform destroy (inside the architecture's directory)

Once finished with the labs, I highly suggest you remove your domain name from Route 53 or else you will be charged every month (see Pricing) for a hosted zone.

Note: if destroying CloudFront distributions fails, run terraform destroy again, this is an issue with Terraform and/or CloudFront.

Further reading

learn-aws's People

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.