Files for Signed cookie-based authentication with Amazon CloudFront and AWS Lambda@Edge + Email Logging

0

I'm trying to follow the demo in the blog posts:

  1. Signed cookie-based authentication with Amazon CloudFront and AWS Lambda@Edge: Part 1 -Authentication and
  2. Signed cookie-based authentication with Amazon CloudFront and AWS Lambda@Edge: Part 2 – Authorization

However, there aren't any files provided for login.html, restricted-content.html, and assets/*.

My questions are:

  1. How could I find these .html files, or how could I create these files on my own?
  2. How could I modify the Lambda@Edge function if I wanted to log the email addresses to a file in an S3 bucket?
1 Answer
0

Hi Nathaniel, thanks for asking this question on re:Post!

Where to find missing files:

The main emphasis of the blog posts is on setting up the authentication and authorization mechanisms. The HTML pages and assets serve to contextualise the authentication process and showcase its functionality. You're encouraged to align your application's HTML pages, assets, design and other requirements with the contents of the blog post.

You can introduce any additional JavaScript, CSS, or other assets as needed for your specific implementation. The primary takeaway is that the provided authentication and authorization setup can be seamlessly integrated with your chosen HTML and UI frameworks to develop a comprehensive web application with secure access controls.

Modifying Lambda@Edge for Logging:

When you want to keep track of email addresses, you have different ways to do it, depending on your use-case. On S3, you can, for example create a separate object for each email, or store all emails in one file, adding new ones as they come, making a big list.

Which way you pick depends on how you want to use the email records, like if you need to look at them later, how often you'll be adding new emails, and how important it is to keep track of the history. You can also consider using a database such as DynamoDB instead of an object to facilitate easier querying your records for your specific needs.

AWS
Piotrek
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions