Skip to content

New: [AEA-6257] - scaffold app with [CDK]#2494

Draft
tstephen-nhs wants to merge 22 commits intomainfrom
aea-6257-cdk-shell
Draft

New: [AEA-6257] - scaffold app with [CDK]#2494
tstephen-nhs wants to merge 22 commits intomainfrom
aea-6257-cdk-shell

Conversation

@tstephen-nhs
Copy link
Copy Markdown
Contributor

@tstephen-nhs tstephen-nhs commented Mar 19, 2026

Summary

  • 🤖 Operational or Infrastructure Change

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.

. .env # source your own version of template.env
make aws-login
make deploy
curl --header "nhsd-nhslogin-user: P9:9446041481" --header "x-request-id: $(cat /proc/sys/kernel/random/uuid)"   https://${stack_name}.dev.eps.national.nhs.uk/Bundle

my example returned

{"resourceType":"Bundle","id":"a7e8f6a6-c20f-4a79-8e0d-6d6c0832d944","meta":{"lastUpdated":"2026-03-24T18:52:13+00:00"},"type":"searchset","total":0,"entry":[]}

Copilot AI review requested due to automatic review settings March 19, 2026 17:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:

AEA-6257

@tstephen-nhs tstephen-nhs changed the title New: [AEA6257] - scaffold app with cdk New: [AEA-6257] - scaffold app with cdk Mar 19, 2026
@tstephen-nhs tstephen-nhs marked this pull request as draft March 19, 2026 18:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/cdk workspace 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",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary, fix before merge

@tstephen-nhs tstephen-nhs changed the title New: [AEA-6257] - scaffold app with cdk New: [AEA-6257] - scaffold app with [CDK] Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants