To use the SAM CLI, you need the following tools.
- SAM CLI - Install the SAM CLI
- Java11 - Install the Java 11
- Docker - Install Docker community edition
Make sure you have docker running
sam build && sam local start-api
curl http://localhost:3000/hello/developer
sam build
sam local invoke HelloWorldFunction --event events/get.json
- Copy AWS credentials for an account using Janus
- Click the lambda icon on in
App.java
- Click
edit configurations
- On the
AWS Connection
tab select the profile of the account you used from Janus - On the
Configuration
tab selectfromHandler
. UnderInput
selecttext
and copy and paste the contents ofget.json
from the events folder and save - Then run or debug from the console
- Run gradle buildZip. This will produce a zip file in build/distributions
- Create a lambda function
- Upload the zip to the lambda function
- Set the path to the handler to be helloworld.App::handleRequest