The aim of this project is to deploy API to AWS Public cloud using only serverless components.
API code is available here.
Following are the serverless services used in this project:
- API Gateway
- Lambda
- Aurora Serverless (MySql)
- AWS Simple Storage Service (S3)
- AWS Secrets Manager
- AWS Certificate Manager (ACM)
- Cloudwatch Logs and Metrics
- Route53
Secrets Manager stores the database credentials securely and the credentials are rotated every 7 days.
Lambda is launched in the VPC private subnet. The access to secrets manager from within the VPC is through VPC Interface endpoint and access to S3 is through VPC Gateway Endpoint.
Terraform is an open-source infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure
The terraform init command initializes a working directory containing Terraform configuration files:
terraform init
The terraform plan command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure:
terraform plan
The terraform apply command executes the actions proposed in a Terraform plan to create, update, or destroy infrastructure:
terraform apply
The terraform destroy command is a convenient way to destroy all remote objects managed by a particular Terraform configuration:
terraform destroy