Giter Site home page Giter Site logo

image-resizing-using-s3-lambda-sns's Introduction

Automated Image Resizing and Transfer System Using AWS Services

Project Description:

This project focuses on building an automated system for image processing and management within the AWS ecosystem. The goal is to streamline the handling of images by automatically resizing them and transferring them to a designated storage location while keeping stakeholders informed through notifications. Key AWS services, such as Lambda, S3, and SNS, are used to orchestrate this workflow.

Key Features:

  1. Image processing automation: Automatically resize and optimize images upon upload.
  2. Secure storage: Store processed images in a secure and reliable S3 bucket.
  3. Real-time notifications: Receive immediate updates about image processing via SNS.
  4. Scalable architecture: Design for scalability to handle image processing demands.
  5. Cost-efficient solution: Leverage AWS serverless technologies to minimize operational costs.

Overview :

a1

Steps :

Step 1 :

Creating Source and Designation s3 Buckets :

  1. Navigate to the S3 Console.
  2. Follow the Outlined Steps below.

i1

i2

i3

  1. Create the destination bucket using the same steps and name it with a unique name.

i4

  1. As you can see above , I created two buckets one is Source bucket and another one is Destination bucket.

Step 2 :

Creating the SNS Notification :

  1. Navigate to the SNS console.
  2. Follow the Outlined Steps below.

i5

i6

i7

i8

i9

i10 3. Scroll down and Click "Create subscription"
4. After this , you will receive some mail for Subscription Confirmation and you have to confirm that.
5. You can use any other protocols also like SQS, HTTP, SMS etc .,

i11

i12

i3

Step 3 :

Creating the Lambda :

  1. Navigate to the Lambda Console.
  2. Follow the Outlined steps below.

i14

i15

  1. Now replace the default code with the image-resizing-s3.py and deploy the changes , Don't test the code now we have to do some more actions before testing.
  2. After that , We have to give some permission for our Lambda Function to do our process (resizing) , For that navigate to the IAM Console and follow the below steps.

i16

i17

i18

i19

i20

i21

i22

  1. Now navigate to the Lambda Console and follow the steps below.

i23

i24

i25

  1. Now we have to trigger the function.

i26

i27

i28

  1. Now we have to go to code section , and scroll down to layers.
  2. We have to add layer .
  3. May be you can think , why ?
  4. It's because for resize the image we upload in our source S3 bucket , We need a python library called pillow in our code to resize the image . We can manually add Pillow library also, But it's very time consuming and you have to do lot more , Instead of manually adding pillow library we are going to use layers for Some easy action.
  5. Follow the outlined Steps below.

i51

i52 12.You can copy the arn from below.

arn:aws:lambda:ap-south-1:770693421928:layer:Klayers-p39-pillow:1
  1. After done all the actions above , now we can test our code.

i49

i50

  1. It will show some results like below , It runs successfully but return some error because we still not upload the images in S3 yet.

i50 1

Step 4 :

Results :

  1. Navigate to the S3 Console.
  2. Upload Some images in Source Bucket.

i29

i30

i31

i32

i33

i34

i35

It Successfully resized the Image and sends me the Notification.

image-resizing-using-s3-lambda-sns's People

Contributors

mathesh-me 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.