This is a serverless cron job written in Python which sends Venmo payment requests once a month.
The project is designed to touch on multiple technologies often encountered as a DevOps Engineer or Software Engineer.
Python script sends Venmo payment requests to the list of users provided. Script validates the users exist and checks request has not already been sent this month before sending the request with the specified amount.
Terraform is used to define all the AWS resources needed to run the script in a Lambda. An eventbridge rule is used to trigger the lambda on a monthly cron schedule. A cloudwatch alarm monitors for any lambda execution errors or code errors and sents them to my email address via SNS.
A Github Actions workflow is triggered upon creating a PR against the main branch to run a speculative plan on the changes and it is required to pass before the PR can be merged. Once the PR is merged another workload is triggered that applied the plan to deploy the AWS changes made in the Terraform definitions.
To get your own instance up and running follow these steps.
- Terraform Cloud Account
- AWS Account
- In your Terraform Cloud Workspace create variables. Example values here.
- required variables:
venmo_access_token
venmo_request_amount
venmo_request_note
venmo_request_schedule
venmo_request_users
send_request
topic_subscription_email
- optional variables
environment
- required variables:
- In your forked repo of this repository create variables
- in Environment named
prod
, create if neededTF_CLOUD_ORGANIZATION
TF_WORKSPACE
- in Action secrets
TF_API_TOKEN
- in Environment named
- Trigger the terraform-apply.yml to deploy.
- Add unit tests