You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add multi-architecture canary support (ARM64 Lambda) (#4606)
## Motivation
Addresses #4380. Supersedes #4428.
The smithy-rs canary only deploys x86_64 Lambda functions. This meant
the [crc-fast 1.4 SIGILL
incident](#4264) was not
caught by smithy-rs CI it was discovered later in the aws-sdk-rust
canary, after release.
This PR expands the canary to also deploy **ARM64 (aarch64) Lambda
functions** on AWS Graviton, catching architecture-specific runtime bugs
before merge.
## Approach
The existing x86_64 canary runs inside a Docker container via the
`docker-build` action. The Docker image is x86_64-only in ECR, so
instead of fixing Docker for ARM, this PR adds a **separate `canary-arm`
job** that runs directly on `ubuntu-24.04-arm` without Docker.
The ARM runner compiles the canary natively, deploys an ARM64 Lambda on
Graviton, and exercises real S3/checksum code paths — the same paths
where crc-fast SIGILL would manifest.
## Changes
**Canary runner (`run.rs`):**
- Add `--architecture` CLI flag to `RunArgs`/`Options`
- Wire architecture through to `build_bundle()` (replaces hardcoded
x86_64)
- Set `.architectures(lambda_arch)` on Lambda creation (ARM64 → `Arm64`)
- Use `provided.al2023` runtime for ARM64 (al2 is deprecated)
- Architecture-suffixed Lambda function names to prevent parallel
collisions
**Build bundle (`build_bundle.rs`):**
- Skip `cross` tool when building natively on ARM
(`std::env::consts::ARCH` check)
- Reduce hash truncation from 24→16 chars to leave headroom for arch
suffix in 64-char Lambda name limit
**Run script (`run-canary`):**
- Accept optional 5th argument for architecture (defaults to `x86_64`)
- Pass `--architecture` to canary runner
**CI workflows (`ci.yml`, `manual-canary.yml`):**
- Add new `canary-arm` job on `ubuntu-24.04-arm` (no Docker)
- Existing x86_64 canary is completely unchanged
## Testing
- Canary runner: `cargo check` ✓, `cargo clippy` ✓, `cargo test` 11/11 ✓
- YAML validation: both workflow files pass syntax check
- Full CI verification pending (this PR)
## What is NOT changed
- Existing x86_64 canary behavior (zero risk)
- Docker infrastructure (`Dockerfile`, `acquire-build-image`,
`docker-build` action)
- Any runtime crates, codegen, or Smithy models
- `arch.rs` (already supports `Aarch64`)
0 commit comments