Skip to content

Deploy AWS resources using Terraform, and automate deployments with GitHub Actions. Includes S3, Lambda, Docker, Step Functions, EventBridge, and IAM roles/policies.

Notifications You must be signed in to change notification settings

rebeccacrompton/aws-serverless-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-serverless-terraform (work in progress)

This project demonstrates using Terraform to deploy AWS resources and GitHub Actions to automate the deployment process. Code pushed to a pull request will have Terraform resources planned to provide visibility on the impact of the code changes. Code merged to the main branch will have resources deployed to the AWS account.

Project structure

  • infra/: Contains all Terraform code for defining AWS infrastructure.
  • .github/: Contains GitHub Actions workflows for deploying Terraform resources.
  • src/: Contains source code for Lambda functions and state machines.

GitHub secrets

The repository is configured with the following GitHub secrets for securely accessing AWS:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION

Included resources

The project will deploy the following serverless resources on AWS:

  • S3 Buckets: Configured with ACLs disabled, versioning enabled, and EventBridge notifications enabled.
  • Lambda Functions: Serverless functions written in Python.
    • Docker deployment example (containerised-lambda)
    • Zip deployment example (simple-lambda)
  • State Machine: AWS Step Functions used to orchestrate a workflow.
  • Event Bridge Rule: Triggering a state machine execution when a new file lands in an S3 bucket.

Terraform backend

Terraform backend is configured with AWS S3 for state storage and Dynamodb for state lock. These resources were configured outside of this project. See reference for configuring a Terraform backend.

About

Deploy AWS resources using Terraform, and automate deployments with GitHub Actions. Includes S3, Lambda, Docker, Step Functions, EventBridge, and IAM roles/policies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages