A fully serverless email system designed with a microservices architecture.
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.
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
-
Tools:
-
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.).
-
Clone the repository:
git clone https://github.com/aws-educate-tw/aws-educate-tpet-backend.git cd aws-educate-tpet-backend
-
Set up environment variables:
export AWS_PROFILE="your-profile"
-
Initialize Terraform (Take one of the microservices as an example for deployment):
cd src/file_service/terraform terraform init -backend-config="dev.tfbackend" -reconfigure
-
Deploy resources:
terraform plan -var-file="dev.tfvars" terraform apply -var-file="dev.tfvars"
If you encounter any issues, feel free to reach out at [email protected] or submit an issue.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
Copyright © 2024 AWS Educate Cloud Ambassador Taiwan