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
/** | |
* This is a simple AWS Lambda function that will look for a given file on S3 and return it | |
* passing along all of the headers of the S3 file. To make this available via a URL use | |
* API Gateway with an AWS Lambda Proxy Integration. | |
* | |
* Set the S3_REGION and S3_BUCKET global parameters in AWS Lambda | |
* Make sure the Lambda function is passed an object with `{ pathParameters : { proxy: 'path/to/file.jpg' } }` set | |
*/ | |
var AWS = require('aws-sdk'); |