-
Notifications
You must be signed in to change notification settings - Fork 78
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
HTTPS problem #7
Comments
Going to S3 -> Properties -> Static Website hosting |
Hi @subpublic, Lambda works fine over HTTPS, either does S3 bucket.
There is an option, however, to use HTTPS. You can hook up your Domain. Then request a certificate. At the moment, I can't find a simple solution. In case Amazon will support it, I will add the description about it. |
Hi. I tried adding HTTPS using this guide. Getting it to point to the S3 Bucket worked fine, but trying to point to the lambda static website (in CloudFront) did not go so well. My https domain just redirects to the http S3 static website instead. |
What have you set in your Lambda -> Environment variables? |
I have set these two variables
I tried using my new https domain instead
But that resulted in another problem, redirects to The action actually seems to work, as the new image gets generated and can be requested via my static https, but because it's redirected two times |
Well, you definitely must have your (https) own domain set since it is your endpoint. Could you please look at this issue #5 and confirm wheather it is the same problem? If you think you encounter the same problem, please, let me know and I will build the project under NodeJS 12x with caching problem fixed for you. |
Alright, could you check this version? |
I tried that, still same problem.
And requesting that responds
If I after that go to |
YAY! Changed the Default Cache TTL to 0, now everything works! (with the version you posted) |
I am really glad it helped. I should release the new version soon. Now to prevent possible future problems like this, could you please share the steps you took? |
Yes First i followed this guide to point https to my S3 website Then
|
Well done @subpublic |
Wanted to add I ran into issues when configuring this for my Cloud Front distribution. On your distribution origin domain name make sure you enter the S3 web Endpoint - not the S3 origin. Otherwise you will receive access denied errors. See issue and resolution here: |
Thanks @sagidM and @subpublic, this worked like a charm!! |
I followed every step an I still get the |
@martinipsy this is not about HTTPS. |
Dear Sagid, it has worked! I'm not sure what the issue was but I'm using it with the cloudfront URL. Thank you! |
Just to point out that without touching anything and having cloudfront setup, just having to point on the website (ex: xxx.s3-website.eu-west-3.amazonaws.com) did the trick. I did not have to change the lambda function, the cache control, the default TTL, env variables. |
@GemN Appreciate your contribution. Some day I will add a detailed explanation of setting CloudFront up considering your comment. |
I am still getting ERR_TOO_MANY_REDIRECTS when I add an image such as https://images.mydomain.com/156x157/img.png as the src on an HTML image. Current settings: Lambda
Route53 Test When I test the Lambda function with params
I get this response:
RELEASE Any thoughts? |
I was able to make it work by point my src in the HTML to the CloudFront distribution https URL (make sure you select the default certificate, i.e., no need to generate a certificate for your domain). I also changed the URL var in the Lambda function to point to the https URL provided by CloudFront. Everything works now. If, like me, you are paranoid and don't wanna risk, checkout the onerror attribute of an image: |
Hi!
I've got the resizing working, but Lambda is not working on HTTPS.
I can reach my original (public) S3 image on
https://[bucket].s3.eu-north-1.amazonaws.com/[image].jpg
andhttp://[bucket].s3.eu-north-1.amazonaws.com/[image].jpg
And resized via Lambda on HTTP
http://[bucket].s3-website.eu-north-1.amazonaws.com/300x300/[image].jpg
But on on HTTPS
https://[bucket].s3-website.eu-north-1.amazonaws.com/300x300/[image].jpg
That just times out.
Though, when I have used Lambda over HTTP I can reach via HTTPS directly through S3.
Any ideas?
The text was updated successfully, but these errors were encountered: