Kyle Munz

Download Form

My resume is available for download as a PDF file, however it is password protected.

How It's Done

Password protected files are nothing new on the web with the typical solutions (Apache .htaccess, PHP forms, etc) requiring a server. But how do you secure online files if you don't have a server? Amazon S3 offers optional "Query String Authentication" for files hosted in S3. The files are not accessible by default, but once they are signed and have the QSA string appended to the URL they become accessible for a specified amount of time.

To generate a QSA string you need to have a role with permissions to that S3 bucket. You could always generate this QSA client-side by embedding an IAM access key and secret in your code but AWS frowns on this practice. The other option is using a Lambda function behind an API Gateway and have your clientside code retrieve it using AJAX calls.

A simple example can be found here.