Giter Club home page Giter Club logo

localstack-terraform-aws-lambda's Introduction

LocalStack & Terraform REST API

This is an example that uses Terraform and LocalStack to spin up a local hot-reloading Node.js AWS Lambda and API Gateway development environment. The features used in this guide require you to have LocalStack Pro. There is a trial membership available. Develop rapidly for the cloud without the associated costs, slow feedback, and risk of actual deployments. LocalStack also works with Pulumi, AWS CloudFormation/CDK, SAM, and more.

In this guide we will:

  1. Set up LocalStack Pro

  2. Deploy resources to LocalStack using one of the following IaC providers:

    1. Terraform HCL .tf
    2. Terraform CDK (CDKTF) .ts
  3. Query your local REST API

Key Files/Directories

  • πŸ“ /cdktf
    • Terraform CDK code used to create and manage AWS resources
  • πŸ“ /docs
    • Markdown documentation about the project
  • πŸ“ /lambda
    • Very simple lambda function that returns a JSON object { message: 'Hello World' } and 200 http status code
  • πŸ“„.env.example
    • File that contains LocalStack Pro key, copy this to a .env file
  • πŸ“„main.tf
    • Primary Terraform HCL file used to create and manage AWS resources

Why do I need to have LocalStack Pro?

Some functionality like UpdateIntegration for API Gateway is not currently available for the community edition of LocalStack. It's possible to force the recreation of the API Gateway integration and get around this, but Pro includes a lot of other handy features, such as the Resource Browser which is a web interface for browsing your LocalStack AWS resources.


If this example was helpful to you or you have questions, drop me a line at [email protected]. Contributions are welcome!

localstack-terraform-aws-lambda's People

Contributors

unit2795 avatar

Stargazers

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