Releases: quicken/aws-static-hosting
initial release
Initial release.
Defaults
By default, this release simply ensures that requests that do not specify a filename default to requesting index.html at the specified location.
Enabling Basic Authentication
Within the javascript change the property "REQUIRE_AUTHENTICATION" from false to true. Then be sure to set the set of username/passwords that are allowed to authenticate in the array "AUTH_CREDENTIALS".
Be aware that using Basic Authentication requires checking the "body" option when deploying the "viewer_request" event to lambda edge.
Known Issue:
If a folder contains a period index.html is not automatically appended causing a 403 or 404 error instead of serving up the page.
This can be mitigated by additionally rewriting all 403 errors with the /index.html page using the CloudFront error re-write functionality.
Using this "hack" any 403 error returned by CloudFront is re-written to status code 200 and the /index.html page is served up. In combination with the basic auth implemented by this lambda is not an issue.