Skip to content

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

Draft
czubocha wants to merge 1 commit into
v4from
feat/aws-node-cloud-extensions-parameter-store
Draft

czubocha wants to merge 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

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