Amazon Simple Queue Service
Amazon Simple Queue Service
Let's look at a website that generates a Meme. Suppose the user wants to upload a photo and
wants to convert into Meme. User uploads a photo on a website and website might store a photo
in s3. As soon as it finished uploads, it triggers a Lambda function. Lambda analyzes the data
about this particular image to SQS, and this data can be "what the top of the meme should say",
"what the bottom of the meme should say", the location of the S3 bucket, etc. The data sits inside
the SQS as a message. An EC2 instance looks at the message and performs its job. An EC2
instance creates a Meme and stores it in S3 bucket. Once the EC2 instance completed its job, it
moves back to the SQS.
The best thing is that if you lose your EC2 instance, then also you would not lose the job as the
job sits inside the S3 bucket.