Created
April 5, 2017 22:57
-
-
Save reisjr/1d081583992c0a7276e48aa52433306d to your computer and use it in GitHub Desktop.
Prepare a lambda function
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
mkdir SampleLambdaFunction | |
chmod 644 SampleLambdaFunction.py | |
cp SampleLambdaFunction.py SampleLambdaFunction | |
cd SampleLambdaFunction | |
pip install "elasticsearch>=2.0.0,<3.0.0" -t . | |
pip install requests_aws4auth -t . | |
zip -9r ../SampleLambdaFunction.zip . | |
aws lambda create-function --region us-east-1 \ | |
--runtime python2.7 \ | |
--timeout 30 \ | |
--description "A sample lambda function." \ | |
--role arn:aws:iam::123456789123:role/SampleLambdaFunctionRole \ | |
--handler SampleLambdaFunction.lambda_handler \ | |
--function-name SampleLambdaFunction \ | |
--zip-file fileb://../SampleLambdaFunction.zip | |
aws lambda update-function-code \ | |
--function-name DVA_StreamResultsToES --zip-file fileb://../DVA_StreamResultsToES.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment