aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::CloudFront::OriginRequestPolicy generic error message if the policy is duplicated
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::CloudFront::OriginRequestPolicy
### Resource name
_No response_
### Description
If an origin request policy with the same name already exists, the resource creation failed after ~3 minutes with generic error message: "Internal error reported from downstream service during operation 'AWS::CloudFront::OriginRequestPolicy'."
Please improve the error message to inform the user about the duplication:
Steps to replicate the issue:
1. Create a stack with AWS::CloudFront::OriginRequestPolicy resource:
```
Resources:
OriginRequestPolicy:
Type: AWS::CloudFront::OriginRequestPolicy
Properties:
OriginRequestPolicyConfig:
HeadersConfig:
Headers:
- User-Agent
- true-client-ip
- Accept
- x-api-key
HeaderBehavior: whitelist
CookiesConfig:
CookieBehavior: none
QueryStringsConfig:
QueryStringBehavior: all
Name: client-origin-request-policy
```
The stack should be created successfully
2. Create the second stack with the exact same template => The error can be seen.
### Other Details
_No response_
Contributor guide
Research direction
The issue provides a CloudFormation template and reproduction steps but names no source files or tests. Start by creating two stacks with the same AWS::CloudFront::OriginRequestPolicy, then verify that the second creation reports a specific duplicate-policy error instead of the generic downstream-service message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100