Skip to content

A fully serverless email delivery system designed with a microservices architecture. This system leverages cloud-native technologies to handle email delivery, processing, and management efficiently.

License

Notifications You must be signed in to change notification settings

aws-educate-tw/aws-educate-tpet-backend

Repository files navigation

cover

AWS Educate TPET Backend

A fully serverless email system designed with a microservices architecture.

Python Version Terraform Version

Introduction

The aws-educate-tw/aws-educate-tpet-backend repository powers the backend of AWS Educate TPET. This project is built with Python and implements the Cloud Native methodology. It leverages AWS Serverless services, microservices architecture, and containerization to deliver a scalable, high-performance system. Infrastructure as Code (IaC) is managed using Terraform, enabling efficient deployment and configuration.

Project Structure

aws-educate-tpet-backend
├── src
│   └── file_service # Each service has its own directory
│       ├── get_file # Each Lambda Function is a separate directory
│       │   ├── Dockerfile # Builds the Lambda's Docker image
│       │   ├── lambda_function.py # Entry point for the Lambda
│       │   └── requirements.txt # Dependencies for this Lambda
│       ├── list_files
│       │   ├── Dockerfile
│       │   ├── lambda_function.py
│       │   ├── file_repository.py
│       │   └── requirements.txt
│       └── terraform # Infrastructure code for this service
│           ├── api_gateway.tf
│           ├── lambda.tf
│           ├── provider.tf
│           ├── variables.tf
│           ├── dev.tfbackend
│           ├── dev.tfvars
│           ├── prod.tfbackend
│           └── prod.tfvars
├── terraform # Shared infrastructure
│   ├── acm_shared_cert
│   ├── cloudfront_for_apis
│   ├── cognito
│   ├── lambda_authorizer
│   └── modules # Terraform modules
│       └── public_s3
└── README.md # Documentation

Setup and Installation

Prerequisites

  1. Tools:

    • Python 3.11
    • Terraform (v1.8.3 or higher)
    • AWS CLI
    • Docker
    • Domain Name (for CloudFront distribution & API Gateway custom domain)
  2. AWS Setup:

    • Ensure proper AWS IAM credentials are configured.
    • Ensure that your DNS is hosted on Route 53.
    • Ensure the AWS SES Production Access is granted.
    • Ensure the shrared infrastructure is deployed (Cognito, ACM, etc.).

Installation Steps

  1. Clone the repository:

    git clone https://github.com/aws-educate-tw/aws-educate-tpet-backend.git
    cd aws-educate-tpet-backend
  2. Set up environment variables:

    export AWS_PROFILE="your-profile"
  3. Initialize Terraform (Take one of the microservices as an example for deployment):

    cd src/file_service/terraform
    terraform init -backend-config="dev.tfbackend" -reconfigure
  4. Deploy resources:

    terraform plan -var-file="dev.tfvars"
    terraform apply -var-file="dev.tfvars"

Contact

If you encounter any issues, feel free to reach out at [email protected] or submit an issue.

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

Copyright © 2024 AWS Educate Cloud Ambassador Taiwan

About

A fully serverless email delivery system designed with a microservices architecture. This system leverages cloud-native technologies to handle email delivery, processing, and management efficiently.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •