Open ueokande opened 2 years ago
ResponseHeadersPolicyId is now available. Thank you.
@zjinmei While this appears in the docs, it doesn't actually work on us-east-1 (as of this time yesterday). My document is rejected with error #/DistributionConfig/DefaultCacheBehavior: extraneous key [ResponseHeadersPolicyId] is not permitted
.
cc @ueokande
Tried it again just now. Same issue.
Any news here? Excited to use this, but am blocked on this.
I am experiencing the same issue when I use serverless framework.
serverless.yml
CF:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
DefaultCacheBehavior:
AllowedMethods:
- DELETE
- GET
- HEAD
- OPTIONS
- PATCH
- POST
- PUT
ResponseHeadersPolicyId: a323da2a-065c-43c9-a263-289cf629c834
result
An error occurred: CF - Properties validation failed for resource CF with message:
#/DistributionConfig/DefaultCacheBehavior: extraneous key [responseHeadersPolicyId] is not permitted.
This appears to be fixed now. :)
It seems this isn't present in all regions yet. I've confirmed it's not present in af-south-1
- see here
Name of the resource
AWS::CloudFront::Distribution
Resource name
No response
Description
CloudFront Distribution now provides custom response headers. https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-cloudfront-supports-cors-security-custom-http-response-headers/
It is available on the CloudFront Console and the APIs. I hope the CloudFormation also supports it.
Other Details
No response