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] The Origin ID has an undocumented limit of 128 characters #11504

Closed
skinny85 opened this issue Nov 17, 2020 · 1 comment · Fixed by #11523
Closed

[CloudFront] The Origin ID has an undocumented limit of 128 characters #11504

skinny85 opened this issue Nov 17, 2020 · 1 comment · Fixed by #11523
Assignees
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p2

Comments

@skinny85
Copy link
Contributor

skinny85 commented Nov 17, 2020

Turns out, trying to create an Origin in a nested Construct tree makes the Origin ID longer than the undocumented 128 character limit, and fails with:

The parameter originId is too big. (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidArgument; Request ID: c1d2d7d6-f5ab-496d-9df9-1d5ab2cd55d8)

This needs to be fixed here (we probably need to take the last 128 characters of uniqueId instead of all of it).

@skinny85 skinny85 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 17, 2020
@github-actions github-actions bot added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label Nov 17, 2020
njlynch added a commit that referenced this issue Nov 17, 2020
The CloudFront origin ID (and group origin IDs) have a 128-character limit,
which may be exceeded by the auto-generated names. This fix takes the last
128 characters of the IDs to prevent deployment failures.

fixes #11504
njlynch added a commit that referenced this issue Nov 17, 2020
The CloudFront origin ID (and group origin IDs) have a 128-character limit,
which may be exceeded by the auto-generated names. This fix takes the last
128 characters of the IDs to prevent deployment failures.

fixes #11504
@njlynch njlynch added in-progress This issue is being actively worked on. effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Nov 17, 2020
@mergify mergify bot closed this as completed in #11523 Nov 17, 2020
mergify bot pushed a commit that referenced this issue Nov 17, 2020
…11523)

The CloudFront origin ID (and group origin IDs) have a 128-character limit,
which may be exceeded by the auto-generated names. This fix takes the last
128 characters of the IDs to prevent deployment failures.

fixes #11504

Related changes:
* I noticed that the CloudFront module was still using the constructs-compat `Construct` instead of the `constructs` one. Instead of fighting the linter, I just fixed that as well.

----

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

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants