Skip to content
/ rsz Public

Batch resizing tool for Amazon S3 object images using Amazon ECR and AWS Lambda

Notifications You must be signed in to change notification settings

norun9/rsz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. Execute Dockerfile for build with any image name to build image
docker image build -t [BUILD_IMAGE_TAG] -f Dockerfile.build . 
  1. Run the image and create a binary file in /target/release/.
docker container run --rm \                                                                               
    -v $PWD:/code \
    -v $HOME/.cargo/registry:/root/.cargo/registry \
    -v $HOME/.cargo/git:/root/.cargo/git \
    [BUILD_IMAGE_TAG]
  1. Build the image for runtime
docker build -t [RUNTIME_IMAGE_TAG] .
  1. Obtain authentication token and authenticate Docker client against registry https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth

  2. Push Docker image to ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html

  3. Deploy ECR image with Labmda

  4. Run ECR image with Lambda

aws lambda invoke --invocation-type Event --function-name [FUNCTION_NAME] --region [REGION_NAME] --payload '{"bucket_name":"xxx", "prefix":"xxx", "tgt_size":128, "tgt_ext":"png"}' --cli-binary-format raw-in-base64-out outputfile.txt

About

Batch resizing tool for Amazon S3 object images using Amazon ECR and AWS Lambda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published