New: [AEA-6258] - Add SSM Parameter construct#619
Conversation
|
This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket: AEA-6258 |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new CDK construct for defining multiple SSM parameters in a single place, automatically generating the corresponding StringParameter resources, an IAM managed policy granting read access, and CloudFormation outputs/exports for downstream consumption.
Changes:
- Added
SsmParametersConstructto create a bundle of SSM parameters + a read managed policy + outputs. - Exported the new construct from the
@nhsdigital/eps-cdk-constructsentrypoint. - Added Vitest coverage validating parameter creation, policy generation, and output exports.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/cdkConstructs/src/constructs/SsmParametersConstruct.ts | New construct that synthesizes SSM parameters, an IAM read policy, and CFN outputs/exports. |
| packages/cdkConstructs/src/index.ts | Re-export the new construct from the package entrypoint. |
| packages/cdkConstructs/tests/constructs/ssmParametersConstruct.test.ts | New unit tests covering the synthesized resources/outputs for the construct. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
| statements: [ | ||
| new PolicyStatement({ | ||
| actions: ["lambda:InvokeFunction"], | ||
| resources: ["*"] |
Check failure
Code scanning / SonarCloud
AWS IAM policies should limit the scope of permissions given High test
| statements: [ | ||
| new PolicyStatement({ | ||
| actions: ["lambda:InvokeFunction"], | ||
| resources: ["*"] |
Check failure
Code scanning / SonarCloud
AWS IAM policies should limit the scope of permissions given High test
| statements: [ | ||
| new PolicyStatement({ | ||
| actions: ["lambda:InvokeFunction"], | ||
| resources: ["*"] |
Check failure
Code scanning / SonarCloud
AWS IAM policies should limit the scope of permissions given High test




Summary
Details
CDK exposes a
StringParameterwhich builds an SSM parameter. I've added anSsmParametersConstructwhich takes an array of parameter definitions, and handles making theStringParameterfor each, creates a policy to read the parameters, and produces relevant outputs.