Skip to content

The bare minimum for a node.js app running on Amazon Lambda.

Notifications You must be signed in to change notification settings

AlpacaUniix/node-lambda-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Lambda Function

Write code in index.js to config env and add function create database to and check data base to inserTable

  1. Create function name 'summer-test-1'

  1. Configuration with VPC (default)

  1. Config ENV
    • RDS_DATABASE
    • RDS_HOSTNAME
    • RDS_PASSWORD
    • RDS_PORT
    • RDS_USERNAME

  1. add triggers API Gateway

Create API Gateway

  • Create resource '/myapi'
  • Create method post
  • connect to lamdafunction name 'summer-test-1'

Create Security group rules

  • Add Inbound rules setting subnet 0.0.0.0/0 because my pc used this ip to connect DB

Create RDS

  • Create database name 'db-summer-1'
  • Add Security group rules to default
  • Add IAM role

And can connect DB in local but cant connect in AWS ka T-T

About

The bare minimum for a node.js app running on Amazon Lambda.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%