Git Product home page Git Product logo

python-lamda-serverless-file-upload-trigger's Introduction

Python Lamda Serverless File Upload

How to deploy this lambda function

Set environment

Setup node.js

Run npm install in root folder

1. Configure AWS Credential in local side

Setup AWS Cli in local side

npm install -g aws-cli

Setup AWS access-key-id and secret-access-key in local side

aws configure

2. Configure serverless.yml

Set environment variables

environment:

aws_access_key_id: # Add aws_access_key_id here

aws_secret_access_key: # Add aws_secret_access_key here

Set bucket name

bucket: uploads-11111 # Change into the bucket name you want

Here, uploads-11111 means bucket name

3. Run the command to deploy

sls deploy

Go to https://s3.console.aws.amazon.com/s3/home, and select the bucket. You will be able to see new bucket name you set in this lambda function

How to perform to test this project

1. Upload file to test this function

Go to the bucket(https://s3.console.aws.amazon.com/s3/home), create new folder "Incoming". And to test this lambda function, upload a file into the folder.

2. Monitor log of this function

Go to Cloud watch(https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logs:) Search this lambda function with prefix, ie. "/aws/lambda/file. And then you can see logs for this function.

python-lamda-serverless-file-upload-trigger's People

Contributors

cocadev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.