Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cloudfront): support gRPC config for distribution #32534

Closed
1 of 2 tasks
go-to-k opened this issue Dec 16, 2024 · 3 comments · Fixed by #32535
Closed
1 of 2 tasks

(cloudfront): support gRPC config for distribution #32534

go-to-k opened this issue Dec 16, 2024 · 3 comments · Fixed by #32535
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@go-to-k
Copy link
Contributor

go-to-k commented Dec 16, 2024

Describe the feature

CloudFormation supports GrpcConfig property to enable gRPC in CacheBehavior and DefaultCacheBehavior.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-grpcconfig.html

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html

So it would be good to enable gRPC for CloudFront Distribution using L2.

Use Case

Amazon CloudFront supports gRPC, an open-source remote procedure call (RPC) framework built on HTTP/2. gRPC offers bi-directional streaming and binary protocol that buffers payloads, making it suitable for applications that require low latency communications.

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-using-grpc.html

Proposed Solution

Add the property like enableGrpc for behavior option.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.173.1

Environment details (OS name and version, etc.)

Mac

@go-to-k go-to-k added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2024
@github-actions github-actions bot added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label Dec 16, 2024
@ashishdhingra ashishdhingra self-assigned this Dec 16, 2024
@ashishdhingra ashishdhingra added p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2024
@ashishdhingra
Copy link
Contributor

The support for GrpcConfig property in CacheBehavior and DefaultCacheBehavior was added 4 days ago via commit https://github.com/cdklabs/awscdk-service-spec/commit/0ffd16642fbb1067754c1fc9306bf985a18daa69/ in latest https://github.com/cdklabs/awscdk-service-spec/blob/main/sources/CloudFormationSchema/us-east-1/aws-cloudfront-distribution.json.

This property is yet to be available in L1 CfnDistribution.CacheBehaviorProperty as of now.

The PR #32540 that updates L1 CloudFormation resource definitions, was merged 4 hours ago. It also added GrpcConfig property per description:

├[~] service aws-cloudfront
│ └ resources
│    └[~] resource AWS::CloudFront::Distribution
│      └ types
│         ├[~] type CacheBehavior
│         │ └ properties
│         │    └[+] GrpcConfig: GrpcConfig
│         ├[~] type DefaultCacheBehavior
│         │ └ properties
│         │    └[+] GrpcConfig: GrpcConfig
│         ├[+] type GrpcConfig
│         │ ├  name: GrpcConfig
│         │ └ properties
│         │    └Enabled: boolean (required)
│         ├[~] type Logging
│         │ └ properties
│         │    └ Bucket: - string (required)
│         │              + string
│         └[~] type OriginGroup
│           └ properties
│              └[+] SelectionCriteria: string

@ashishdhingra ashishdhingra added effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Dec 16, 2024
@ashishdhingra ashishdhingra removed their assignment Dec 16, 2024
@go-to-k
Copy link
Contributor Author

go-to-k commented Dec 17, 2024

@ashishdhingra

Thank you! I have confirmed that the PR has been merged and will proceed with my PR.

@mergify mergify bot closed this as completed in #32535 Feb 20, 2025
mergify bot pushed a commit that referenced this issue Feb 20, 2025
### Issue # (if applicable)

Closes #32534.

### Reason for this change



CloudFormation supports `GrpcConfig` property to enable gRPC in `CacheBehavior` and `DefaultCacheBehavior`.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-grpcconfig.html

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html

So it would be good to enable gRPC for CloudFront Distribution using L2.

### Description of changes



Add  `enableGrpc` property in `BehaviorOptions`.

### Description of how you validated changes



Both unit and integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2025
yashkh-amzn pushed a commit to yashkh-amzn/aws-cdk that referenced this issue Feb 21, 2025
### Issue # (if applicable)

Closes aws#32534.

### Reason for this change



CloudFormation supports `GrpcConfig` property to enable gRPC in `CacheBehavior` and `DefaultCacheBehavior`.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-grpcconfig.html

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-cachebehavior.html

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html

So it would be good to enable gRPC for CloudFront Distribution using L2.

### Description of changes



Add  `enableGrpc` property in `BehaviorOptions`.

### Description of how you validated changes



Both unit and integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants