Skip to content

feat(microvm): add lifecycle hook service - #5280

Open
edersonbrilhante wants to merge 38 commits into
feat-microvm-runner-providerfrom
feat-microvm-lifecycle-hooks
Open

edersonbrilhante wants to merge 38 commits into
feat-microvm-runner-providerfrom
feat-microvm-lifecycle-hooks

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the MicroVM lifecycle-hook service and the CI, release, and integration-test changes needed to exercise the complete provider flow.

  • Adds the lambdas/services/microvm-lifecycle-hooks service with strict lifecycle-payload validation, runner-configuration consumption, process management, graceful shutdown, and the documented Node 24/s6 runtime contract.
  • Registers, builds, tests, packages, and attests the lifecycle-hook Lambda in the Lambda and release workflows.
  • Replaces the separate MicroVM and multi-runner-v2 MiniStack paths with the multi-runner-webhook example, which configures EC2 and MicroVM lanes behind one webhook deployment.
  • Adds an extensible Python smoke harness with shared webhook lifecycle orchestration and provider-specific EC2 and MicroVM checks, including scale-up, pool, and scale-down coverage.
  • Updates the example documentation, Terraform/OpenTofu lockfiles, and MiniStack workflow to use the unified smoke entrypoint.

Test Plan

  • Lifecycle-hook unit tests for payload validation, lifecycle handling, process management, server behavior, storage, and timing.
  • Lambda service formatting, linting, test, build, packaging, and artifact inspection.
  • Terraform formatting, validation, TFLint, conflict checks, and git diff --check.
  • Terraform and OpenTofu init -lockfile=readonly for the unified multi-runner-webhook example.
  • No live AWS deployment was performed.

Related Issues

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

lambdas/services/microvm-lifecycle-hooks/package.json

PackageVersionLicenseIssue Type
@aws-github-runner/storage-providersNullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@aws-github-runner/storage-providers UnknownUnknown
npm/@types/node ^22.19.3 UnknownUnknown
npm/esbuild ^0.27.0 UnknownUnknown

Scanned Files

  • .github/workflows/ministack.yml
  • lambdas/services/microvm-lifecycle-hooks/package.json

@edersonbrilhante
edersonbrilhante changed the base branch from feat-dynamodb-storage-provider to main September 2, 2026 17:26
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 13c3be9 to 3b01396 Compare September 3, 2026 21:41
@edersonbrilhante
edersonbrilhante changed the base branch from main to feat-microvm-runner-provider September 3, 2026 21:41
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 201a04e to c02017f Compare September 3, 2026 22:57
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 3b01396 to ff1c303 Compare September 3, 2026 23:01
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from ff1c303 to 875750c Compare September 3, 2026 23:09
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from c02017f to 8d9e62b Compare September 3, 2026 23:15
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 875750c to 1ebe98e Compare September 3, 2026 23:15
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 8d9e62b to 972ddf3 Compare September 4, 2026 10:49
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from b3fc224 to b2ebcca Compare September 4, 2026 10:50
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 972ddf3 to 23c8fc3 Compare September 4, 2026 11:20
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from b2ebcca to 79651c5 Compare September 4, 2026 11:20
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 23c8fc3 to ab91edd Compare September 4, 2026 11:36
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 79651c5 to 140f5af Compare September 4, 2026 11:37
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from ab91edd to c65071f Compare September 4, 2026 11:43
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 140f5af to 485aa97 Compare September 4, 2026 11:43
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from c65071f to 77bbad2 Compare September 4, 2026 11:49
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 485aa97 to 8d00fd5 Compare September 4, 2026 11:50
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 77bbad2 to d38a4e8 Compare September 4, 2026 11:53
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 8d00fd5 to 955406c Compare September 4, 2026 11:53
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from d38a4e8 to 1a8e263 Compare September 4, 2026 12:04
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 955406c to 4317bfb Compare September 4, 2026 12:04
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 1a8e263 to 86985a0 Compare September 4, 2026 12:10
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 4317bfb to f5669db Compare September 4, 2026 12:11
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 86985a0 to 470cb89 Compare September 4, 2026 12:16
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from f5669db to 9148986 Compare September 4, 2026 12:16
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-runner-provider branch from 470cb89 to c6f336b Compare September 4, 2026 12:23
@edersonbrilhante
edersonbrilhante force-pushed the feat-microvm-lifecycle-hooks branch from 9148986 to f0b9051 Compare September 4, 2026 12:23
Comment thread .github/workflows/ministack.yml Fixed
Comment thread .github/workflows/ministack.yml Fixed
Comment thread .github/workflows/ministack.yml Fixed

const payload = parseObject<VersionedRunPayload>(request.runHookPayload, 'runHookPayload must contain valid JSON');
if (payload.version === 1) {
if (!hasExactKeys(payload, ['version', 'runnerConfigSsmPath'])) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should align this parser with the payload produced by #5255. I tried passing the actual createMicrovmRunHookPayload output into parseRunRequest, and it was rejected both with and without a pinned image version: the producer always includes runnerTokenSsmPath, and can also include imageArn and imageVersion.

There also seems to be a path distinction we should preserve: the producer uses runnerConfigSsmPath for bootstrap settings and runnerTokenSsmPath for the JIT token, whereas this maps the former to SSM_TOKEN_PATH. Maybe a test that feeds the producer output directly into this parser would help keep the two contracts aligned. Is there a translation step I'm missing?

edersonbrilhante and others added 6 commits September 22, 2026 16:55
## Description

Documents the deployment dependencies for Lambda MicroVM runners after
#5280.

- Distinguishes the MicroVM image build role from the runner execution
role.
- Explains that the build role creates and publishes the image, while
the execution role is passed by the control-plane TypeScript to
`RunMicrovm` and runs the ephemeral job.
- Documents the dependency order: apply the MicroVM foundation, build
and release the lifecycle-hook server, build the image with Packer, and
deploy the runner control plane.
- Points to the repository examples for the foundation, image,
lifecycle-hook, and combined EC2/MicroVM webhook deployment.
- Documents that the lifecycle-hook server is built and released through
the existing Lambda artifact workflow, then embedded in the MicroVM
image.

## Test Plan

- Ran `git diff --check`.
- Reviewed the documented role ownership and commands against the
foundation, MicroVM provider, image, lifecycle-hook, and multi-runner
example implementations.
- Confirmed the change is documentation-only; no infrastructure was
deployed.

## Related Issues

- Stacked on #5280.
- Related foundation work: #5377.
- Related MicroVM provider work: #5413 and #5255.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compute-provider:aws_microvm javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants