This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Extract the request from the CloudFront event that is sent to Lambda@Edge | |
var request = event.Records[0].cf.request; | |
var params = ''; | |
if(('querystring' in request) && (request.querystring.length>0)) { | |
params = '?'+request.querystring; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://medium.com/@chrispointon/default-files-in-s3-subdirectories-using-cloudfront-and-lambda-edge-941100a3c629 | |
// Register this as the viewer-request trigger handler | |
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Extract the request from the CloudFront event that is sent to Lambda@Edge | |
var request = event.Records[0].cf.request; | |
// Extract the URI and params from the request | |
var olduri = request.uri; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 6 ]; then | |
echo "Usage: ddbtablescan.sh <profile> <table> <attributeToFilterOn> <attributeValueToFilterWith> <maxItemsPerSec> <listOfAttributesToReturn>" | |
echo "e.g." | |
echo "ddbtablescan.sh my-profile Users company Amazon 10 firstName,lastName,email" | |
exit 1 | |
fi | |
found=$(which aws) |