aws / aws/aws-cdk

feat(cloudfront): Add support for flat-rate pricing plans (Free/Pro/Business/Premium)

Open
#37,857 1 comment 11 reactions 0 assignees View on GitHub
@aws-cdk/aws-cloudfront effort/medium feature-request p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

AWS launched CloudFront flat-rate pricing plans in November 2025, introducing
four tiers (Free/$0, Pro/$15, Business/$200, Premium/$1,000 per month) that
bundle CloudFront CDN, AWS WAF, DDoS protection, Route 53 DNS, CloudWatch Logs,
and S3 storage credits into a single monthly price with no overage charges.

Currently, CDK has no native support to assign a pricing plan to a CloudFront
distribution. Users must either set it manually via the AWS Console or implement
a Lambda-backed Custom Resource that calls the `pricingplanmanager.amazonaws.com`
API directly — which adds unnecessary complexity to infrastructure code.

### References
- [CloudFront flat-rate pricing plans – AWS Docs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/flat-rate-pricing-plan.html)
- [AWS announcement – November 2025](https://aws.amazon.com/about-aws/whats-new/2025/11/aws-flat-rate-pricing-plans/)
- [pricingplanmanager IAM actions](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awspricingplanmanagerservice.html)

### Use Case

AWS launched CloudFront flat-rate pricing plans in November 2025
(Free/$0, Pro/$15, Business/$200, Premium/$1000/month).
Currently there is no CDK L1/L2 support to assign a pricing plan
to a CloudFront distribution. Users must either set it manually
via the console or use a Custom Resource workaround.

### Proposed Solution

### Proposed API

```typescript
new cloudfront.Distribution(this, 'MyDistribution', {
defaultBehavior: {
origin: origins.S3BucketOrigin.withOriginAccessControl(bucket),
},
pricingPlan: cloudfront.DistributionPricingPlan.BUSINESS,
});
```

### Expected behavior

- Add a `pricingPlan` property to the `Distribution` L2 construct
- Add a `DistributionPricingPlan` enum with values: `FREE`, `PRO`, `BUSINESS`, `PREMIUM`
- CDK automatically calls `pricingplanmanager:CreateSubscription` during deployment
- On `cdk destroy`, CDK calls `pricingplanmanager:CancelSubscription`

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS CDK Library version (aws-cdk-lib)

2.215.0

### AWS CDK CLI version

2.215.0

### Environment details (OS name and version, etc.)

Ubuntu 24.04

Contributor guide

Open the contributing guide

Research direction

Start with the CloudFront Distribution L2 construct and determine how an AWS CDK resource can coordinate pricingplanmanager calls during deployment and deletion. Read the CreateSubscription and CancelSubscription IAM actions and CloudFront pricing-plan documentation, then verify that the proposed pricingPlan property and enum support all four tiers with the expected lifecycle behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.