Skip to content

Instantly share code, notes, and snippets.

View Warsaalk's full-sized avatar

Klaas Van Parys Warsaalk

View GitHub Profile
@erhangundogan
erhangundogan / index.js
Created December 5, 2017 13:43
AWS Lambda HTTP basic auth
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';