Skip to content

steven-ww/email-lambda

Repository files navigation

Using SES and a Quarkus Lambda to send emails.

Full description here : https://steven-webber.com/2020/09/03/using-a-quarkus-lambda-with-ses/

AWS Setup

  • Create a Service role lambda-s3-email-role - to allow the Lambda to execute
    • added AWSLambdaExecute Policy to allow access to S3
    • added lambda-send
      • custom policy to allow sending emails
    • added s3 read only policy
  • S3 Bucket
    • Configured SES to deliver mails received to an S3 Bucket
  • Add S3 trigger to the deployed Lambda

Building/Testing

  • Build/Package
./mvnw clean package
  • Using SAM Local to test the Lambda.
sam local invoke --template target/sam.jvm.yaml --event payload.json

Build the Native Image ./mvnw clean package -Pnative -Dnative-image.docker-build=true

Set the Role ARN export LAMBDA_ROLE_ARN="arn:aws:iam::123456:role/lambda-s3-email-role"

Use the script to deploy sh target/manage.sh native create

About

Use Quarkus to receive emails using AWS SES

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages