New: [AEA-6257] - scaffold app with [CDK]#2494
Draft
tstephen-nhs wants to merge 22 commits intomainfrom
Draft
Conversation
Contributor
|
This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket: AEA-6257 |
There was a problem hiding this comment.
Pull request overview
Adds an initial AWS CDK application/workspace to provision the Prescriptions for Patients API infrastructure (lambdas, Step Functions state machine, and API Gateway), plus supporting scripts and Makefile targets.
Changes:
- Introduces a new
packages/cdkworkspace containing CDK apps (bin/), stacks (stacks/), and constructs/resources (resources/). - Adds operational scripts for cleaning up PR/main stacks and a cdk-nag suppression configuration.
- Wires the new workspace into the monorepo (workspaces, Makefile targets, and ignore rules).
Reviewed changes
Copilot reviewed 14 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cdk/tsconfig.json | TS config for the new CDK workspace |
| packages/cdk/package.json | CDK workspace scripts and dependencies |
| packages/cdk/cdk.json | CDK watch and feature-flag context configuration |
| packages/cdk/bin/PfPApiApp.ts | Main CDK app entrypoint that instantiates PfPApiStack |
| packages/cdk/bin/PfPApiSandboxApp.ts | Sandbox CDK app entrypoint that instantiates PfPApiSandboxStack |
| packages/cdk/stacks/PfPApiStack.ts | Stack wiring Functions + StateMachines + Apis and nag suppressions |
| packages/cdk/stacks/PfPApiSandboxStack.ts | Placeholder sandbox stack |
| packages/cdk/resources/Functions.ts | Defines Lambda functions and shared env/policies/layer |
| packages/cdk/resources/StateMachines.ts | Defines Step Functions state machine(s) and IAM for invoking imported Lambda |
| packages/cdk/resources/StateMachineDefinitions/GetMyPrescriptions.ts | State machine definition chain/choice logic |
| packages/cdk/resources/Apis.ts | API Gateway + endpoints wiring to state machine + status Lambda |
| packages/cdk/nagSuppressions.ts | cdk-nag suppression configuration for IAM/APIGW findings |
| packages/cdk/scripts/deletePrStacks.ts | Script to delete unused PR stacks |
| packages/cdk/scripts/deleteMainStacks.ts | Script to delete unused main stacks based on active API versions |
| package.json | Adds packages/cdk to npm workspaces |
| package-lock.json | Workspace + dependency lock updates for CDK deps |
| Makefile | Adds CDK targets and runs cdk workspace lint/test/clean |
| .gitignore | Ignores cdk.out/ and .env |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "tsx": "tsx" | ||
| }, | ||
| "dependencies": { | ||
| "@nhsdigital/eps-cdk-constructs": "file:../../nhsdigital-eps-cdk-constructs-1.6.0.tgz", |
Contributor
Author
There was a problem hiding this comment.
Temporary, fix before merge
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
789c147 to
9e16206
Compare
54c3ea7 to
7e92406
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Details
Initial cut of creating the stack with CDK. Sufficient to scaffold the app and curl a response, albeit that params and secrets from the stateful stack are not in place yet.
my example returned