yang-xiaodong / aws-lambda-s3-img-resize

AWS Image Resize Lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aws-lambda-s3-img-resize

This starter project consists of:

  • Function.cs - class file containing a class with a single function handler method
  • aws-lambda-tools-defaults.json - default argument settings for use with Visual Studio and command line deployment tools for AWS

You may also have a test project depending on the options selected.

The generated function handler responds to events on an Amazon S3 bucket. The handler receives the bucket and object key details in an S3Event instance and returns the content type of the object as the function output. Replace the body of this method, and parameters, to suit your needs.

After deploying your function you must configure an Amazon S3 bucket as an event source to trigger your Lambda function.

Here are some steps to follow to get started from the command line:

Once you have edited your template and code you can deploy your application using the Amazon.Lambda.Tools Global Tool from the command line.

Install Amazon.Lambda.Tools Global Tools if not already installed.

    dotnet tool install -g Amazon.Lambda.Tools

If already installed check if new version is available.

    dotnet tool update -g Amazon.Lambda.Tools

Deploy function to AWS Lambda

    cd "aws-lambda-s3-img-resize/src"
    dotnet lambda deploy-function

About

AWS Image Resize Lambda

License:Apache License 2.0


Languages

Language:C# 100.0%