Skip to content

A barebones Lambda Project using Groovy + Spock for unit testing

License

Notifications You must be signed in to change notification settings

eric-gonzales/barebones-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

groovy-lambda

A barebones Groovy lambda function

Step 0 - Dependencies

  • Ensure gradle is installed. GVM works well: gvm
  1. curl -s get.gvmtool.net | bash
  2. gvm install gradle

Step 1 - Code

  • Clone the project and create a new package in src/groovy or adjust the src/groovy/example class to your liking

Step 2 - Build

  • gradle build
  • Ensure you have a zip in build/distributions/

Step 3 - Deploy

  • Login or create an account to access your AWS Console
  • Click the Lambda link
  • Click the "Create a Lambda Function" button
  • Fill in the name, description, select Java 8 as the runtime
  • Browse to the zip file created in Step 2 by clicking on the upload button
  • The handler should be in the form package.class::handler
  • Create and/or select an execution role, i.e. basic_lambda_execution
  • Click the "Create Lambda" button

Step 4 - Test

  • Browse to the edit/test screen
  • Enter input based off the handler
  • Click the invoke button and verify that you get the response that you expect

About

A barebones Lambda Project using Groovy + Spock for unit testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages