Migrate invoicing-api from CloudFormation to native CDK #263
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates the invoicing-api infrastructure from CloudFormation to AWS CDK, improving maintainability and consistency with other Guardian projects. The migration provides type-safe infrastructure definitions and better integration with Guardian CDK patterns while maintaining full backward compatibility.
What's Changed
🆕 New Files
invoicing-api-stack.ts- Complete CDK stack implementation for invoicing API infrastructure with Lambda functions, API Gateway, CloudWatch alarms, and IAM rolescdk.ts- CDK application entry point with support for CODE and PROD environmentspackage.json- CDK project dependencies and deployment scriptscdk.json- CDK configuration with AWS feature flagstsconfig.json- TypeScript configuration for CDK projectREADME.md- Comprehensive documentation for CDK deployment and architecturecfn-migration-notice.yaml- Migration notice template explaining the transition to CDKsettings.json- VS Code settings to exclude build artifacts from file watcher📝 Modified Files
cfn.yaml- Replaced original CloudFormation template with migration notice and placeholder resourcesBreaking Changes
None - this is a like-for-like migration maintaining full backward compatibility with existing Lambda code, API endpoints, and configuration.
Related Issues
This addresses the ongoing initiative to migrate all CloudFormation templates to native CDK implementations across the Value Team's repositories.
Note: The original CloudFormation template (
cfn.yaml) has been replaced with a migration notice. The CDK implementation provides identical infrastructure and can be deployed immediately.