Serverless Lambda Java

1 min read serverless, lambda, java

Written in 2019. Tools, APIs and prices may have changed since.

Lab note What I wrote down while learning this by building with it. Short by design; the code is in pfeilbr/serverless-lambda-java-playground.

serverless framework + lambda java

Build and Deploy

cd serverless-lambda-java-playground
serverless create --template aws-java-maven
mvn clean install
sls deploy --verbose
sls invoke --function hello --data '{"msg": "hello"}' --log
{
    "statusCode": 200,
    "body": "{\"message\":\"Go Serverless v1.x! Your function executed successfully!\",\"input\":{}}",
    "headers": {
        "X-Powered-By": "AWS Lambda & serverless"
    },
    "isBase64Encoded": false
}

Resources

Keep learning

Get new guides and courses by email

An occasional email when I publish a new guide, course or post. No spam, and you can unsubscribe any time.

Sent with Buttondown. I never share your address. Prefer a feed? Use the RSS feed.