GithubHelp home page GithubHelp logo

martinlevington / cookie-shop-serverless Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danpudwelluk/cookie-shop-serverless

0.0 1.0 0.0 60 KB

License: MIT License

Python 88.70% Shell 11.30%

cookie-shop-serverless's Introduction

cookie-shop-serverless

This is an example project for Serverless in AWS

We will be using SAM (https://github.com/awslabs/serverless-application-model)

Most services will be using the free tier so costs should be very minimal.

Prerequisites:

  1. Signup for an AWS account
  2. Fork this project into your GitHub account
  3. Python 3.7
  4. Postman

Activity:

  1. Run source cookie-shop-env/bin/activate
  2. Run unit tests coverage run --branch --source='.' -m unittest and coverage with coverage report -m --fail-under=100 --omit=*/__init__.py,tests/*,cookie-shop-env/*
  3. Run the setup-template.yaml in AWS Cloudformation
  4. Create a CodeBuild project
    • Connect your GitHub fork
    • This sets up our CI/CD pipeline
  5. Run the build
    • This build should create a new Cloudformation stack and create all the resources for us
  6. Explore the created resources in AWS - Dynamo, Lambda, API Gateway, IAM
  7. Add a stream to our Orders DynamoDB
    • Uncomment the stream stuff in template.yaml
    • When an order is placed it will now update the quantity of cookies left
    • Run unit tests and coverage again
  8. Add authentication
    • Uncomment the authentication stuff in template.yaml and swagger.yaml
    • The orders endpoint is now protected by IAM (AWS sigv4)
    • To use, go to IAM User, create an access key and secret, then add to the request

cookie-shop-serverless's People

Contributors

danpudwelluk avatar martinlevington avatar

Watchers

 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.