Skip to content

Instantly share code, notes, and snippets.

View amolkokje's full-sized avatar

Amol Kokje amolkokje

View GitHub Profile
@amolkokje
amolkokje / MyLambdaFunctionUpdate
Created November 26, 2019 00:00
Lambda Function Update from CFN
# Lambda function deployed by the stack
MyLambdaFunction:
DependsOn:
- CopyZips
Type: AWS::Lambda::Function
Properties:
Description: 'Lambda function to index data to ES when object is added to S3'
Handler: my_lambda.lambda_handler
Runtime: python2.7
Role: !GetAtt 'MyLambdaFunctionRole.Arn'
@amolkokje
amolkokje / CopyZips.txt
Last active November 26, 2019 00:00
CopyZips cfn template gist
# Custom Resource: Used to copy all specified lambda zip packages in the 'Objects' list to the LambdaZipsBucket
CopyZips:
Type: Custom::CopyZips
Properties:
ServiceToken: !GetAtt 'CopyZipsFunction.Arn'
DestBucket: !Ref 'LambdaZipsBucket'
SourceBucket: !Ref 'LambdaSourceBucket'
Prefix: !Ref 'LambdaSourceBucketPrefix'
Objects:
- !Ref 'LambdaFunctionPackage'
@amolkokje
amolkokje / centos_python_env_setup
Last active October 17, 2017 16:16 — forked from floer32/centos_python_env_setup
CentOS 6: Install Python 2.7.4, pip, virtualenv, and virtualenvwrapper on CentOS (plus some bonus items at the end if you want). You should probably run with `sudo`.
# INSTRUCTIONS TO RUN:
# 1 --> copy this script to centos machine
# 2 --> chmod 775 script_name.sh
# 3 --> ./script_name.sh
function log() {
echo "$( date '+[%F_%T]' )" "${HOSTNAME}:" "${LOG_PREFIX}:" "$@"
}