Coder Social home page Coder Social logo

yaohuiwu / learn-terraform-lambda-api-gateway-typescript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hashicorp/learn-terraform-lambda-api-gateway

0.0 0.0 0.0 180 KB

A simple demo to show how to using typescript to write AWS lambda function and expose it using AWS api gateway and deploy it using terraform.

Home Page: https://learn.hashicorp.com/tutorials/terraform/lambda-api-gateway?in=terraform/aws

License: Mozilla Public License 2.0

JavaScript 2.69% HCL 64.42% TypeScript 32.88%

learn-terraform-lambda-api-gateway-typescript's Introduction

Learn Terraform - Lambda functions and API Gateway

AWS Lambda functions and API gateway are often used to create serverless applications.

This repo is a companion repo to the AWS Lambda functions and API gateway tutorial.

How to run the example ?

  1. Init the hello-world project.

     cd hello-world
     npm install
    
  2. Compile the typescript code to javascript.

     npm run build
    
  3. Init terraform.

     cd ..
     terraform init
    
  4. Create all the infrastructure.

     terrform apply
    
  5. Then we call the api.

     curl "$(terraform output -raw base_url)/hello?Name=Terraform"
    
  6. Create an item in Music table

     "Artist","SongTitle","AlbumTitle","Awards"
     "Acme Band","Happy Day","Album Title","10"
    
     curl "$(terraform output -raw base_url)/hello?Name=Acme+Band&SongTitle=Happy+Day"
    
  7. Don't forget to destroy everything when you finished testing.

     terrform destroy
    

learn-terraform-lambda-api-gateway-typescript's People

Contributors

duplo83 avatar hashicorp-copywrite[bot] avatar judithpatudith avatar ritsok avatar robin-norwood avatar tom-on-the-internet avatar yaohuiwu avatar yusufcodes 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.