S3 Architecture using SQS, SNS & lambda

S3 Architecture using SQS, SNS & lambda

  1. S3 Bucket: An Amazon S3 bucket is a storage repository within the AWS cloud that holds objects such as files, images, and videos. In the diagram, changes trigger events that are then delivered to an Amazon SNS topic.

  2. Amazon SNS Topic: Amazon Simple Notification Service (SNS) is a messaging service that allows you to send notifications when specific events happen in your AWS account. In the architecture, the SNS topic distributes the S3 bucket event notifications to subscribed services.

  3. Amazon CloudTrail: CloudTrail is a service that logs AWS API calls for your account. It provides a history of who did what, when, and where within your AWS account. In the image, CloudTrail is likely logging the SNS notification.

  4. Amazon CloudWatch: CloudWatch is a monitoring and observability service for AWS resources. It allows you to collect and track metrics, logs, and events from your AWS resources. In the diagram, CloudWatch is likely gathering metrics on the SNS notifications.

  5. Amazon SQS: Amazon Simple Queue Service (SQS) is a messaging queue that allows you to decouple and scale micro-services in the cloud. In the architecture, SNS delivers the S3 bucket event notifications to an SQS queue.

  6. AWS Lambda: AWS Lambda is a serverless compute service that lets you run code without provisioning or managing servers. In the image, an AWS Lambda function is likely triggered by the SNS message in the SQS queue.

Here’s a breakdown of how this architecture might work:

  • An object is uploaded or changed within the S3 bucket.

  • The S3 bucket event triggers an SNS notification.

  • SNS publishes the notification to the SNS topic.

  • CloudTrail logs the SNS notification.

  • CloudWatch collects metrics on the SNS notification.

  • The SNS topic delivers the notification to an SQS queue.

  • An AWS Lambda function is triggered by the SNS message in the SQS queue.

  • The Lambda function can perform actions such as sending an SNS notification or logging data to Amazon DynamoDB.