pip install localstack
or pip3 install localstack
localstack start
-
aws_init.sh
- creates s3 buckets and creats lambda execution role with the right policy -
create_lambda.sh
- creates lambda function with simple code that outputs the key of the s3 file created event -
configure_s3_to_publish_event.sh
- configure event for s3 object-creation which will trigger a lambda -
aws logs tail "/aws/lambda/MyLambdaFn" --endpoint-url http://localhost:4566 --follow
- follow lambda logs forconsole.log
statements -
aws s3 cp test.txt s3://source-bucket/test.txt --endpoint-url http://localhost:4566
- copy local file to s3 bucket
https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html