I am trying to CloudFormation for my Lambda@Edge resource, which I would like to utilize CloudFront's new origin request policy.
However, when I tried to deploy the following resource with aws cloudformation:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: "Test"
Resources:
CloudFrontOriginRequestPolicy:
Type: AWS::CloudFront::OriginRequestPolicy
Properties:
OriginRequestPolicyConfig:
CookiesConfig:
CookieBehavior: none
HeadersConfig:
HeaderBehavior: none
QueryStringsConfig:
QueryStringBehavior: none
Name: Managed-CORS-Policy
It only gave this error:
Invalid request provided: AWS::CloudFront::OriginRequestPolicy
I have no clue where it really went wrong; I believe I already provided all required fields in the resource following: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-originrequestpolicy.html
Anyone has experience how this resource should be setup? Thanks!