Skip to content

feat(cloud-extensions): add Parameter Store reader example - #848

Merged
czubocha merged 1 commit into
v4from
feat/aws-node-cloud-extensions-parameter-store
Dec 3, 2026
Merged

czubocha merged 1 commit into
v4from
feat/aws-node-cloud-extensions-parameter-store

Conversation

@czubocha

@czubocha czubocha commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add aws-node-cloud-extensions-parameter-store: a Node.js function that reads a Parameter Store parameter through AWS Systems Manager Cloud Extensions, configured with provider.cloudExtensions and the aws:parameterstore extension.
  • The extension calls Parameter Store with its own role, scoped to the one parameter; the function's role gets no Parameter Store permission, so the value can only arrive through the extension.
  • The parameter is an AWS::SSM::Parameter under resources, named per stage, so deploy, check and remove are self-contained.
  • A live test invokes the function and checks for Hello from Parameter Store, the value only the extension can return.

Lesson: give functions the Parameter Store extension with provider.cloudExtensions and read a parameter through http://localhost:5333/parameterstore with the unchanged AWS SDK client.

Left out, each its own example if wanted: Secrets Manager and AppConfig, per-function cloudExtensions, version pinning and approve, extension settings, an existing role or profile, and the local-run fallback.

This example needs the release of the Serverless Framework that ships cloudExtensions (serverless/serverless#14205). Until that release, the live job on this pull request, which installs the released CLI, can't deploy the example.

Test plan

  • npm run docs, node scripts/check-examples.mjs, npm test, npm run validate and check-examples.mjs --package are clean
  • README followed by hand: the deploy printed the cloud extensions section and the invoke returned the parameter value
  • Live test with the Framework built from feat(aws): add Cloud Extensions for Lambda functions serverless#14205: PASS aws-node-cloud-extensions-parameter-store 4.47.0 107s, with only the live-test role's permissions
  • Negative control: with cloudExtensions: false on the function, the live test stops at the check step (connect ECONNREFUSED 127.0.0.1:5333)
  • No stack, parameter, log group, role or Cloud Extensions profile left after the runs

Generated by Claude Code

@czubocha
czubocha marked this pull request as ready for review December 3, 2026 21:02

czubocha commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

The live job ran again on 501bbc4 and failed at the check step, as expected before the release. The job installs the released CLI (4.47.0), which does not yet accept provider.cloudExtensions (unrecognized property), so the function is deployed without its Cloud Extensions settings and the invoke fails. Deploy and remove now complete in the test account (Service parameter-reader has been successfully removed), so nothing is left behind. The job is expected to pass once the release that ships serverless/serverless#14205 is out.


Generated by Claude Code

@czubocha
czubocha merged commit 9900b1d into v4 Dec 3, 2026
7 of 9 checks passed
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.

1 participant