Coder Social home page Coder Social logo

devops-serverless01's People

Contributors

alanlima avatar

Watchers

 avatar

devops-serverless01's Issues

SSM Parameter Store

Specification

SSM Parameter store: Use parameter store to store and retrieve the value of DB_NAME in your 3 Musketeers scripts.

Tasks

  • Add resource to create the SSM Parameter

AWS Lambda

Specification

Lambda:

  1. Source code is provided for you in Python (it is in the src/lambda.zip). Check it in src/ folder. You will point to this zip file in your terraform Lambda resource.
  2. This lambda will have an environment variable called DB_NAME. Make sure the value for this variable is fetched from SSM Parameter Store for deployment.
  3. Tip: Lambda permissions: Lambda will need dynamodb:PutItem access. Lambda will also need to grant invokeFunction permission to the API Gateway.

Tasks

  • Create terraform resource to create the lambda function
  • Use provided python code to update the lambda. (TDB) It could be done via deployment script
  • Set the environment variable DB_NAME as the database name created on task #1 using SSM Parameters created on task #4
  • Add dynamodb:PuItem permission
  • (TDB) Lambda will also need to grant invokeFunction permission to the API Gateway.

Dynamo DB

Specification

  1. Table name must be DA_Serverless
  2. Create a table like the following:
    1. id (Partition Key): String
    2. firstname: String
    3. lastname: String
    4. email: String
  3. Use the CMK Key created before to encrypt the DynamoDB table at rest. Encryption Type should show KMS in the console for the Table.

Tasks

  • Create terraform module to create the DynamoDB
  • Use CMK Key created on task #2
  • Encryption Type must be shown as KMS in console

API Gateway

Specification

  1. You need to create a public REST API that will expose the following endpoints:
    1. POST /customers: For creating a new customer in the database.
  2. API Gateway: All resources will have Proxy integration with Lambda
  3. Authentication: Use API Key to protect your API. Push the value of the API key to SSM parameter store after creation.

Tasks

  • create terraform resource to create the API Gateway.
    It must have:
    • set to public REST API
    • add the POST /customers which will call the lambda function to create customers
    • (TBD) all resource will have proxy integration with lambda
  • Authentication Mode: API KEY
    • create the api key and push it to SSM parameter

Automation - Scripts

Specification

  1. Make targets:
    1. deploy: It will deploy the solution using Terraform, creating all resources listed above
    2. clean: It will destroy all resources created.

Tasks

  • create docker-compose with the following services: aws-cli and terraform-cli
  • create Makefile with the following targets:
    • deploy: it will init and apply the terraform infrastructure
    • clean: it will call terraform destroy

(Optional) Tasks

Tasks for development / tests purposes

  • list-customers to list customers from DynamoDB
  • create-random-customer to create a random customer into the database
    • Optionally, we could allow to set a number of customers to be created.

KMS Key

Specification

KMS Key: Create a new key used for encrypting the DynamoDB table.

  1. Tip: lambda will require access to Encrypt the data using this key. This needs to be described in the KMS Key policy.

Tasks

  • create terraform resource to create the KMS Key
  • (TDB) allow lambda functions to access the KMS Key policy

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.