Lightpress stores its AWS infrastructure definitions as CloudFormation templates in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/reds-skywalker/Lightpress/llms.txt
Use this file to discover all available pages before exploring further.
infraestructure/cloudformation/ directory. CloudFormation lets you treat infrastructure as code — each stack describes the AWS resources it manages, and you deploy or update it with a single CLI command. This approach makes environments reproducible and keeps infrastructure changes auditable alongside application code.
What CloudFormation provisions
Lightpress CloudFormation templates are designed to provision the AWS resources that support a microservices SaaS architecture. Depending on the templates you deploy, stacks can manage resources across the following service categories:Compute and containers
Compute and containers
ECS clusters, ECS task definitions, ECS services, and ECR repositories for storing Docker images built by CodeBuild. Each microservice in
microservices/ maps to its own ECS service.Networking
Networking
VPCs, subnets, internet gateways, NAT gateways, security groups, and Application Load Balancers that route traffic to the appropriate microservice.
Storage and databases
Storage and databases
S3 buckets for static assets and build artifacts, and managed database resources for persistent microservice data.
IAM
IAM
IAM roles and policies that grant least-privilege access for ECS tasks, CodeBuild projects, and cross-service calls.
CI/CD
CI/CD
CodeBuild projects and any CodePipeline resources that automate the build and deployment workflow defined in
buildspec.yml.Deploying a stack
Use theaws cloudformation deploy command to create a new stack or update an existing one. The command is idempotent — if the stack already exists and the template has not changed, it completes without making any changes.
Configure the AWS CLI
Make sure the AWS CLI is configured with credentials that have permission to create and manage the resources in your template.Verify your identity before deploying:
Package the template (if it uses local references)
If your template references local files (such as nested stacks or Lambda function code), package it first to upload those artifacts to S3 and produce a deployable template.
Deploy the stack
Run The
aws cloudformation deploy with your template file and stack name. Pass parameters using --parameter-overrides.--capabilities CAPABILITY_NAMED_IAM flag is required when your template creates named IAM resources.Monitor the deployment
Track stack events in real time from the AWS Management Console, or poll with the CLI:Wait for the stack to reach a stable state:
Stack parameters
Pass configuration values to your templates using--parameter-overrides. Common parameters for Lightpress stacks:
| Parameter | Description | Example |
|---|---|---|
Environment | Deployment environment | production, staging |
AppVersion | Application version tag | 1.0.0, main-abc1234 |
VpcCidr | CIDR block for the VPC | 10.0.0.0/16 |
DesiredCount | Number of ECS task replicas | 2 |
DBInstanceClass | RDS instance type | db.t3.micro |
Parameters section of each template file in infraestructure/cloudformation/.
Updating a stack
Use the sameaws cloudformation deploy command to update an existing stack. CloudFormation computes a change set — a diff between the current and desired state — and applies only the required changes.