aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

Issue creating AWS::CloudFront::ResponseHeadersPolicy

Open
#1,156 11 comments 1 reaction 0 assignees View on GitHub
bug NeedTriage
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

Other

### Resource Name

AWS::CloudFront::ResponseHeadersPolicy

### Issue Description

Hi, I am seeing `Internal error reported from downstream service during operation 'AWS::CloudFront::ResponseHeadersPolicy'.` or `Resource handler returned message: "Invalid request provided: AWS::CloudFront::ResponseHeadersPolicy" (RequestToken: f28bc45a-39b5-aabf-e46a-2c8e5e464249, HandlerErrorCode: InvalidRequest)`, depending on the provided configuration.

The issue sounds very familiar to the ones at https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/571

Whether I provide a pretty complete response header policy or a completely empty one as can be seen here, either result in `CREATE_FAILED` errors.
```
"ResponseHeaders84BC52D6": {
"Type": "AWS::CloudFront::ResponseHeadersPolicy",
"Properties": {
"ResponseHeadersPolicyConfig": {
"Name": "testHeaders"
}
},
"Metadata": {
"aws:cdk:path": "test/gateway-setup/ResponseHeaders/Resource"
}
},
```

I am in eu-central-1 and the IAM role used for deployment has `AdministratorAccess` (set up via CDK pipelines) in case that makes any difference. Any other resources deploy without errors (e.g. the Distribution itself).

### Expected Behavior

I expect for a ResponseHeadersPolicy to be created when I provide a name for it.

### Observed Behavior

It errors with an internal error that doesn't give a hint about what I did wrong.

### Test Cases

Create a cloudformation stack in eu-central-1 like
```
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"ResponseHeaders": {
"Type": "AWS::CloudFront::ResponseHeadersPolicy",
"Properties": {
"ResponseHeadersPolicyConfig": {
"Name": "testHeaders"
}
}
}
}
}
```

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

No repository file or test is identified. Start by reproducing the supplied CloudFormation template in eu-central-1 and compare the result with the linked issue 571; done would mean AWS::CloudFront::ResponseHeadersPolicy creates successfully with the shown configuration and reports a useful error otherwise.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.