Serverless App - Pet-Cuddle-O-Tron

Serverless App - Pet-Cuddle-O-Tron

·

2 min read

This AWS project by Adrian Cantrill involves implementing a simple serverless application using S3, API Gateway, Lambda, Step Functions, SNS, and SES. The application loads from an S3 bucket, communicates with lambda and step functions, and enables the configuration of reminders for pet cuddles to be sent via email.

There are six basic stages involved:

  • Configure Simple Email Service (SES)

  • Add an email lambda function to use SES to send emails for the serverless application

  • Implement and configure the state machine, the core of the application

  • Implement the API Gateway, API, and supporting lambda function

  • Implement the static frontend application and test its functionality

The final state of the project is shown below:

Stage 1: SES

The first step of the project was setting up two verified identities on SES. I created these with my email addresses and verified both.

Stage 2: Email Reminder Lambda Function

A lambda execution role was required for this, and I created one using the CloudFormation resource provided by Cantrill.

This was followed by the lambda function itself, which sends an email to an address it's supplied with.

Stage 3: State Machine

Another IAM role was created for the state machine to enable interaction with other AWS services. Following that was the creation of the state machine, which was configured using the email_reminder_lambda_arn and the previously created IAM role.

Stage 4: API Gateway and Supporting Lambda Function

A second lambda function called api_lambda was created and configured to use the state_machine_arn. After that, the API gateway was created and configured to use the api_lambda function as the integration type.

Stage 5: Frontend Application

At this stage of the project, an S3 bucket was created with static website hosting to host the application frontend.

The final web page is shown below alongside the email: