This repository contains the AWS CDK (Cloud Development Kit) application for managing the Ticket Warehouse infrastructure, which includes pipeline and application stacks for multiple environments: staging, production, and development.
The CDK application is structured into two main types of stacks:
- Pipeline Stacks: These stacks define the CI/CD pipelines that orchestrate the deployment process for the Ticket Warehouse application across different AWS accounts and environments.
- Application Stacks: These stacks contain the actual AWS resources (like Lambda functions, DynamoDB tables, etc.) that make up the Ticket Warehouse application.
- Deploy Account: - Used for orchestrating deployments.
- Staging Account: - Staging environment resources.
- Production Account: - Production environment resources.
- Development Account: - Development environment resources.
ticket-warehouse-pipeline-staging
ticket-warehouse-pipeline-production
ticket-warehouse-pipeline-development
These stacks set up the CI/CD pipeline which automates the deployment process. They typically only need to be deployed once.
ticket-warehouse-pipeline-staging/staging/ticket-warehouse
ticket-warehouse-pipeline-production/production/ticket-warehouse
ticket-warehouse-pipeline-development/development/ticket-warehouse
These stacks contain the resources that constitute the Ticket Warehouse application for their respective environments.
Before deploying any stack, you must have:
- AWS CLI installed and configured.
- AWS CDK installed.
- Proper IAM permissions to create and manage the required AWS resources.
To deploy any of these stacks, you need the appropriate credentials. You can configure these credentials in the AWS CLI or pass them at deployment time using the --profile
flag.
For example, to deploy the development application stack, make sure you have the development account credentials set up, then run:
cdk deploy ticket-warehouse-pipeline-development/development/ticket-warehouse
Alternatively, if you're using named profiles for AWS CLI, you can deploy using the profile flag:
cdk deploy ticket-warehouse-pipeline-development/development/ticket-warehouse --profile development-profile
To deploy the development pipeline stack, you would need the Deploy account credentials. Once set, run:
cdk deploy ticket-warehouse-pipeline-development
Or with the profile flag:
cdk deploy ticket-warehouse-pipeline-development --profile deploy-account-profile