Repository navigation
feat(aws-node-customer-managed-runtime): add an example that publishes a customer-managed runtime and runs a function on it - #831
Merged
Conversation
…remove in live tests
…s a customer-managed runtime and runs a function on it
…nd app service folders
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
aws-node-customer-managed-runtime, a Compose example with two services:runtimepublishes a customer-managed Lambda runtime:AWS::Lambda::Runtime, a versionv1from a container image, and the aliasstable, with the alias ARN as a stack output.appruns a Node.js function on it. Compose passes the output in, and the function setsprovider.runtime: ${param:runtimeAliasArn}./etc/runtime-info.json. The function returns that file's contents, which only this runtime has. The image is built for arm64 with a COPY-only Dockerfile, so it builds on any machine.test/prepare.mjsruns the README's image steps for the live test, andtest/cleanup.mjsdeletes the repository.test/smoke.mjsinvokes the function and assertsHello from platform-node24 v1. The tier isslow, because of the container image.README.mdandexamples.jsonare regenerated.Lesson: publish a runtime from a container image, and run a function on it through its alias.
Left out:
v2and moving the alias, andruntimeManagementpins;The README's Next steps link the docs for these.
Depends on:
test.prepare/test.cleanuphooks). This PR's base is that branch; retarget it tov4once feat(scripts): run test.prepare before deploy and test.cleanup after remove in live tests #830 merges.main). This PR's live job and thev4live test use the latest release, so they pass once that release is out.Test plan
npm run docs,check-examples.mjs(0 errors) andnpm test(323 pass).check-examples.mjs --package:appcannot be packaged beforeruntimeis deployed, because it reads that service's output.compose-multiframeworkstops the same way, and CI does not run--package; the live test covers the deploy.us-east-1, with the CLI from the source ofmain:PASS aws-node-customer-managed-runtime 4.46.0 153s. The result line shows the last release's number.PASS aws-node-customer-managed-runtime 4.46.0 150s.v2fails at thecheckstep (expected the output to contain "Hello from platform-node24 v2"; got … "Hello from platform-node24 v1"), and then removes and cleans up.Lambda does not have permission to access the ECR image. The policy is now in the README and intest/prepare.mjs, and the run removed its stacks and repository.Generated by Claude Code