Code Monkey home page Code Monkey logo

aws-cloudformation-quizzes-example's Introduction

AWS CloudFormation Quizzes Example

This repo contains the AWS CloudFormation templates and supporting files that were used to test the building the backend stack for the a commercial trivia app (Fall 2018) within Amazon Web Services (the code was not deployed and delivered to the client because we ultimately went with Google Cloud Platform for project reasons).

Usage

The file database.yaml is designed primarily to provision the VPN and subnets, and position a new RDS instance within it to function as the SQL database for the system. It should only be run once, at the beginning of the project, to the create this part of the stack. Running this template will prompt the user for specific parameters, including the master password for the database. These parameters, as well as the ids of the generated private subnets and security groups, and the host of the database instance, will be used in the second phase of the set-up, and should be recorded.

The file pipeline.yaml is designed to run second, and should also be run only once. It uses some of the parameters and output values of database.yaml. It is designed to create a new AWS CodePipeline instance, and within this pipeline, a new AWS CodeBuild instance that builds and deploys the AWS Lambda functions and affiliated API Gateway that allow HTTPS interaction with the SQL database.

For its source, the CodeBuild project pulls from a branch of a second Github repo (i.e. not this one) and runs a build script (the buildspec.yml of the project) that is embedded within pipeline.yaml itself. The pipeline is configured to receive a webhook notification from the Github repo such that whenever the master branch is updated, CodePipeline will pull the updated repository files (all of them) from the tip of the master branch and initiate a new build process to either create or update the Lambda functions and the API Gateway.

The result of the build process is a packaged zip file of Python code (for the Lambda functions) that is bundled in a zip file and placed into S3 bucket ready for deployment.

In the deployment stages of the pipeline, a new CloudFormation (sub-)stack is created in which a Change Set is created from the bundled Lambda functions, and then this Change Set is executed across the deployment fleet of instances on which the Lambda functions are or will be running. It also updates the API Gateway if necessary (i.e. with new or updated HTTP methods and paths).

aws-cloudformation-quizzes-example's People

Contributors

matthew-trump avatar

Watchers

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