(aws-ec2): Add `InterfaceVpcEndpointAwsService.SCHEDULER` for EventBridge Scheduler
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
`aws-cdk-lib/aws-ec2` exposes static `InterfaceVpcEndpointAwsService` constants for most AWS services (EVENTBRIDGE, STEP_FUNCTIONS, LAMBDA, etc.), but has no constant for EventBridge Scheduler (`com.amazonaws..scheduler`).
Users must currently construct it manually:
```ts
this.vpc.addInterfaceEndpoint('SchedulerEndpoint', {
service: new InterfaceVpcEndpointAwsService('scheduler'),
});
```
### Use Case
VPC-attached Lambdas that call the EventBridge Scheduler API (aws-sdk-scheduler) need an interface VPC endpoint (or NAT egress).
Adding a supported constant would match the ergonomics of other services and avoid the surprise that Scheduler is not covered by EVENTBRIDGE (which points at events, a separate service).
### Proposed Solution
Add to packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts:
```ts
public static readonly SCHEDULER = new InterfaceVpcEndpointAwsService('scheduler');
```
Region availability per AWS docs: https://docs.aws.amazon.com/scheduler/latest/UserGuide/using-vpc-endpoints.html
### Other Information
_No response_
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.258.1
### AWS CDK CLI version
2.1135.1 (build 6551740)
### Environment details (OS name and version, etc.)
Amazon Linux 2
Contributor guide
Research direction
Start with packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts and review the neighboring InterfaceVpcEndpointAwsService constants. Add the Scheduler service constant described in the issue, then verify that the aws-ec2 tests pass and that the exposed constant represents the scheduler endpoint and is usable by VPC interface endpoints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100