Labels

algorithms (22) Design Patterns (20) java (19) linux (14) Snippet (13) service mix (6) soa (4)

Cloudizza

Cloudizza

A Simple AWS Lambda to compress images using imagemagick

The idea is to build a Lambda which will compress images using imagemagick

the steps involved are as follows 


  1. Create a source and destination S3 buckets
  2. when we upload a JPG file to source s3 bucket
  3. An event is triggered from the source S3 to the Lambda 
  4. the Lambda is responsible to read the source image and use imagemagick
    and compress and write back to destination S3 bucket 



1) Creating a S3 Bucket 

2) There are 3 ways in which a Lambda can be invoked

  1. using a trigger ( push mechnaism)
  2. pull mechanism like (SQS)
  3. direct invocation of Lambda
AWS gives many trigger points which can trigger a Lambda, In this we will choose an S3 Event

3) Code for Lambda
Code for the Lambda which gets triggered when a JPG file is uploaded to S3

4) aws lambda update-function-code --function-name images --s3-bucket purna-srcimages --s3-key file.zip --publish

5) Trigger the Lambda by uploading an image in source bucket , should compress and upload to the destination bucket

2 comments:

  1. The team possessed strong project management skills, responding promptly to messages
    Bay Area web design firms

    ReplyDelete
  2. On the off chance that you are procuring an autonomous Aerocity Escorts, you need to manage that Escorts in Aerocity itself. Brighter your life with attractive and venereal Call Girls Service in Aerocity available to satisfy your lustful longings. Maybe you are searching for the high-class sexual pleasure in Aerocity. Hence give us a chance to serve you the best services according to your needs.
    Booking of Call Girls
    Call Girls Near IGI Airport Delhi
    Call Girls Service in Aerocity
    Real Photo of call girls in Aerocity
    Escorts for Party in Aerocity Hotels
    Sex Service in Aerocity

    ReplyDelete

Search 24 Bytes