Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
node.js as front end authentication for cloudfront + s3

I'm a fan of using cloudfront + s3 to serve static sites. I have a use case where I need to run a site in s3, but I need authentication. I'd like to be able to handle this in a serverless way, but I need some sort of application to handle the auth logic.

My idea is that I could run a node.js application on something like elastic beanstalk in front of cloudfront to handle authentication.

Basically a user makes a request to the application, my app authenticates the user with our authentication backend, creates a cookie returns it and then serves the private cloudfront url for the requested resource. Am I on the right track here?

The idea is to have a gated s3 website that a user can browser after authenticating. I think this could be achieved using node http and passport to authenticate and then use the aws sdk to create the signed cookie.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Yes. This makes sense.

Depending on your use case, it might be sufficient to use AWS API Gateway + Lambda for login page and authentication (instead of elastic beanstalk).

Also AWS recently announced Lambda@Edge which is a way to execute Lambda functions in response to Cloudfront events. That could work for what you are describing - http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-response-generation.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!