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

Maintenance: Docs are not accessible due to bad Cloudfront redirect config #1726

Closed
silicakes opened this issue Oct 1, 2023 · 4 comments · Fixed by #1728
Closed

Maintenance: Docs are not accessible due to bad Cloudfront redirect config #1726

silicakes opened this issue Oct 1, 2023 · 4 comments · Fixed by #1728
Assignees
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)

Comments

@silicakes
Copy link

silicakes commented Oct 1, 2023

It looks like cloudFront redirect rule is wrong as it redirects to: https://powertools.aws.devhttps://github.com/aws-powertools/
Check out the bottom part of this log (301):

Expected Behaviour

Clicking links from the Readme sends you to an incorrect location, i.e:
https://powertools.aws.dev/lambda/typescript/latest/utilities/parameters/ instead of https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/ (note the docs subdomain)
Although the link is correct.

If you manually fill the missing docs part after the redirect and referred from aws, this will not redirect you and the link will become accessible.

Current Behaviour

Screen.Recording.2023-10-01.at.11.28.20.mov

image

Code snippet

❯ curl -v docs.powertools.aws.dev -L
*   Trying 65.9.112.51:80...
* Connected to docs.powertools.aws.dev (65.9.112.51) port 80 (#0)
> GET / HTTP/1.1
> Host: docs.powertools.aws.dev
> User-Agent: curl/8.1.2
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: CloudFront
< Date: Sun, 01 Oct 2023 08:17:58 GMT
< Content-Type: text/html
< Content-Length: 167
< Connection: keep-alive
< Location: https://docs.powertools.aws.dev/
< X-Cache: Redirect from cloudfront
< Via: 1.1 3440b79c112e9514e3e6f25a7439db3c.cloudfront.net (CloudFront)
< X-Amz-Cf-Pop: TLV50-C2
< X-Amz-Cf-Id: ek7r6DLQyt445JHlD28d0PYS4pyojH9GMuPSMO19xx8EG2X5mFNfWg==
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< Referrer-Policy: strict-origin-when-cross-origin
< X-Content-Type-Options: nosniff
<
* Ignoring the response-body
* Connection #0 to host docs.powertools.aws.dev left intact
* Clear auth, redirects to port from 80 to 443
* Issue another request to this URL: 'https://docs.powertools.aws.dev/'
*   Trying 65.9.112.51:443...
* Connected to docs.powertools.aws.dev (65.9.112.51) port 443 (#1)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=docs.powertools.aws.dev
*  start date: May 11 00:00:00 2023 GMT
*  expire date: Jun  8 23:59:59 2024 GMT
*  subjectAltName: host "docs.powertools.aws.dev" matched cert's "docs.powertools.aws.dev"
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M01
*  SSL certificate verify ok.
* using HTTP/2
* h2 [:method: GET]
* h2 [:scheme: https]
* h2 [:authority: docs.powertools.aws.dev]
* h2 [:path: /]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* Using Stream ID: 1 (easy handle 0x14b010600)
> GET / HTTP/2
> Host: docs.powertools.aws.dev
> User-Agent: curl/8.1.2
> Accept: */*
>
< HTTP/2 301
< server: CloudFront
< date: Sun, 01 Oct 2023 08:17:58 GMT
< content-length: 0
< location: https://powertools.aws.devhttps://github.com/aws-powertools/
< x-cache: FunctionGeneratedResponse from cloudfront
< via: 1.1 e93c671d969240be8a6839ba09d3b732.cloudfront.net (CloudFront)
< x-amz-cf-pop: TLV50-C2
< x-amz-cf-id: -_XaS1QPKW3H4dhdULEI8-m5lALe8jbSRd91KsJVb3hh6ejrOj3PMA==
< x-xss-protection: 1; mode=block
< x-frame-options: SAMEORIGIN
< referrer-policy: strict-origin-when-cross-origin
< x-content-type-options: nosniff
< strict-transport-security: max-age=31536000
<
* Connection #1 to host docs.powertools.aws.dev left intact
* Issue another request to this URL: 'https://powertools.aws.devhttps//github.com/aws-powertools/'
* Could not resolve host: powertools.aws.devhttps
* Closing connection 2
curl: (6) Could not resolve host: powertools.aws.devhttps

Steps to Reproduce

Click on any documentation related link inside the readme, i.e https://powertools.aws.dev/lambda/python/latest/tutorial/
It works when adding the proper subdomain: https://docs.powertools.aws.dev/lambda/python/latest/tutorial/

Possible Solution

Update codebuilds redirect rules

Powertools for AWS Lambda (TypeScript) version

latest

AWS Lambda function runtime

18.x

Packaging format used

npm

Execution logs

No response

@silicakes silicakes added triage This item has not been triaged by a maintainer, please wait bug Something isn't working labels Oct 1, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 1, 2023

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@silicakes silicakes changed the title Bug: Docs are not accessible (bad links, cross-sdk) Bug: Docs are not accessible due to bad Cloudfront redirect config Oct 1, 2023
@dreamorosi dreamorosi self-assigned this Oct 1, 2023
@dreamorosi
Copy link
Contributor

dreamorosi commented Oct 1, 2023

Hi @silicakes thanks for reporting the issue - you are right, there's something wrong with the redirects.

We are looking into it and will fix it as soon as possible.

According to our definition of bugs, given this is not a runtime issue I'll be changing the issue type to maintenance.

In the meantime that the redirect gets fixed in the backend, I'll work on fixing the links on the README files as soon as I can.

@dreamorosi dreamorosi added documentation Improvements or additions to documentation internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) confirmed The scope is clear, ready for implementation and removed bug Something isn't working triage This item has not been triaged by a maintainer, please wait labels Oct 1, 2023
@dreamorosi dreamorosi changed the title Bug: Docs are not accessible due to bad Cloudfront redirect config Maintenance: Docs are not accessible due to bad Cloudfront redirect config Oct 1, 2023
@dreamorosi
Copy link
Contributor

The issue should be fixed on the CloudFront side, however we'll still update the links in the README and docs so that we don't go though the redirects at all.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

⚠️ 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.

@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Oct 9, 2023
@dreamorosi dreamorosi moved this from Coming soon to Shipped in Powertools for AWS Lambda (TypeScript) Oct 9, 2023
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation internal PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
Projects
Development

Successfully merging a pull request may close this issue.

2 participants