Commit 37fa3a8
authored
feat: support dedicated host ec2 overrides (#5191)
## Description
Adds support for applying supported dynamic EC2 override labels to
dedicated-host runner launches that use `RunInstances`.
This maps the parsed `ec2OverrideConfig` into the `RunInstances` request
for supported fields:
- `InstanceType`
- `SubnetId`
- `ImageId`
- `Placement`
- `BlockDeviceMappings`
Fleet-only override fields such as `InstanceRequirements`, `MaxPrice`,
`Priority`, and `WeightedCapacity` are intentionally not forwarded to
`RunInstances`.
Also updates the dynamic label documentation to show which EC2 override
labels work with EC2 Fleet and which work with dedicated-host launches.
## Test Plan
- Added unit test coverage for dedicated-host `RunInstances` overrides.
- Verified supported EC2 override config values are passed to
`RunInstances`.
- Verified Fleet-only fields are not passed to `RunInstances`.
- Ran `yarn exec vitest run
functions/control-plane/src/aws/runners.test.ts --config
functions/control-plane/vitest.config.ts`
- Ran `yarn exec eslint functions/control-plane/src/aws/runners.ts
functions/control-plane/src/aws/runners.test.ts`
- Ran `yarn workspace @aws-github-runner/control-plane build`
- Ran `git diff --check`
## Related Issues
N/A1 parent db92e55 commit 37fa3a8
3 files changed
Lines changed: 238 additions & 85 deletions
0 commit comments