S3 + CloudFront: Lambda function with authentication for X users

Hello,
I need to password protect static website running behind S3 + CloudFront.
According to Google Lambda@Edge is the best (?) for it.
The problem is that those users (>50) are external users and are not integrated with our IAM. I was just thinking about the following options:

  • Lambda function with hardcoded list of users/passwords (and update passwords 1/month)
  • Lambda function connecting to external DB with where all users/password are stored (which one would be the cheapest ?)
    What do you recommend ?

I don’t think it’s quicker for the first user but the object will then be stored on the edge location for subsequent requests if the item is still cached Nox Vidmate VLC.