Repository navigation
feat!: v4 - Bun customer-managed runtime by default, published public artifacts - #16
Merged
Merged
Conversation
…yer CLI - BunLambdaLayer resolves the published layer ARN from artifacts.json by region (layerVersionArn or assetZipPath for other regions); BunFunction takes any ILayerVersion - Package no longer ships the layer zip (tarball ~44 KB) - bun-lambda-runtime build-layer CLI (dist/cli.js) builds the layer zip - Docs: custom-layer how-to, README, DOCS.md, ADR decisions
- command/publishLayer.ts: idempotent publish + public share per region (SDK) - command/writeArtifacts.ts: merge per-region results into src/artifacts.json - release.yml: build zip, publish eu-central-1, integration test on the published layer, publish the other regions, then GitHub release and npm - integration.yml: published-layer input; PR runs deploy a layer built from source - docs: OIDC setup for the artifacts account, exec policy for the published layer
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.
Implements ADR: Public artifacts for v4.
Breaking changes
BunFunctionnow runs on the Bun customer-managed runtime (CMR). It setsruntimeConfigwithlambda.mixins.FunctionRuntimeConfig, soaws-cdk-lib2.278.0 or newer is required.bunRuntime: { runtimeArn, runtimeAlias }overrides the published runtime.BunFunctionWithLayeris the new construct for the layer path (bunLayeris required there). CMR and layer never share a construct.BunLambdaLayerreferences the layer published for the package version (layerVersionArnorassetZipPathfor your own).eu-north-1,eu-central-1,eu-west-1,us-east-1andus-west-2, users publish their own runtime (bun-lambda-runtime publish-runtime) or build a layer (bun-lambda-runtime build-layer).Publishing
command/publishRuntime.tsbuilds the runtime image (GitHub release Bun binary onprovided:al2023), pushes it to ECR, creates the runtimebun, a version named after the package version, and aliases<x.y.z>,<x.y>(default),<x>,latest, pluspkg-<package version>(never moved). Moving aliases never move to an older version. The same code backs the CLI command and the release workflow.release.yml: publishes layer and runtime toeu-central-1, runs the integration test against them (including a CMR function), then publishes all five regions (idempotent), sets the moving aliases, makes the runtime public, and publishes to npm.publish-smoke.yml: publishes a throwaway runtime version to one region, for checking the publish role.Verified
tscand lint pass.publish-smoke.ymlran green against the production account (403247376652,eu-central-1).BunFunctiondeployed with CDK in the test account on the production runtime (runtime/bun, cross-account) ran and echoed its payload.aws-cdkCLI is upgraded to 2.1149 to read assemblies from aws-cdk-lib 2.278.Not verified
release.ymlrun, including all five regions, the moving aliases and--publicthrough the workflow.After merging
Run
releasemanually with Bun1.4.5.