Skip to content

mfyz/claudia-express

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Running Express app on Lambda using Claudia

To create lambda express wrapper

claudia generate-serverless-express-proxy --express-module app

This command creates lambda.js (wrapper) and adds the aws-serverless-express dependency

To Deploy

First deployment:

claudia create --handler lambda.handler --deploy-proxy-api --region us-east-1

When running the initial deployment command, claudia will return the new API gateway url that it set up for us.

to make repeat deployments:

claudia update

To test from the api gateway url:

https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/latest/ping

should return pong, and:

https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/latest/time

should return the current server time as string.

To Test from cli

claudia test-lambda

with event data:

claudia test-lambda --event event-file.json

or

echo '{"name": "Fatih"}' | claudia test-lambda --event /dev/stdin

Logs

To check the logs after invoking:

aws logs filter-log-events --log-group-name /aws/lambda/claudia-express

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published