Загрузка...

Day 29 of 90 Days of Cloud - Integration

Day 29 — 13/10/2025 of #90daysofcloud
Focus: Application Integration — SQS (queuing), SNS (notifications), S3 → SNS email on upload
Today felt like teaching a mailbox to talk to a postman. I dove into AWS application integration: SQS for reliable queuing, SNS for pub/sub notifications, and how events can flow from S3 into notifications. I built a tiny pipeline where uploading a file to S3 immediately triggers an email via SNS — super satisfying!

What I learned:
1. SQS: Standard vs FIFO queues, visibility timeout, long polling, dead-letter queues (DLQ).
2. SNS: Topics, subscriptions (email, SMS, HTTP), message fan-out.
3. S3 Event Notifications: how S3 can trigger SNS, SQS, or Lambda on object events.
4. Integration pattern: S3 → SNS → Email (or SQS → worker processing).

Step-by-step (how I achieved each task):
1. Created SNS topic (console and CLI)
CLI:
aws sns create-topic --name s3-upload-topic
Capture the ARN from the response, e.g. arn:aws:sns:us-east-1:111122223333:s3-upload-topic.
2. Subscribe an email to the SNS topic
aws sns subscribe --topic-arn arn:aws:sns:REGION:ACCOUNT_ID:s3-upload-topic --protocol email --notification-endpoint you@example.com
Confirm the subscription from email inbox.
3. Created and used an S3 bucket and add event notification
Console:
S3 - bucket - Properties - Event notifications - Create event notification: on PUT (All object create events), Destination: SNS topic (choose s3-upload-topic).
CLI (usingJSON notification config):
aws s3api put-bucket-notification-configuration \
--bucket my-bucket-name \
--notification-configuration '{
"TopicConfigurations"🙁
{
"Id":"NotifyOnUpload",
"TopicArn":"arn:aws:sns:REGION:ACCOUNT_ID:s3-upload-topic",
"Events"🙁"s3:ObjectCreated:*"]
}
]
}'
4. Tested:
aws s3 cp sample.txt s3://my-bucket-name/
Check email — the SNS notification arrives with the S3 object info.
5. SQS queue + DLQ for processing workers
Created queue:
aws sqs create-queue --queue-name my-worker-queue
Configured S3 to send to SQS or subscribe SQS to SNS for fan-out.
Practical notes & gotchas:
1. SNS email subscriptions require confirmation from the recipient.
2. For cross-account SNS - S3 integration you may need bucket policies.
3. SQS long-polling reduces empty receives: set ReceiveMessageWaitTimeSeconds.
4. Enable dead-letter queues for resilient processing.
#90DaysofCloud #Day29 #AWS #SQS #SNS #S3 #Serverless #CloudIntegration #CloudTips

Видео Day 29 of 90 Days of Cloud - Integration канала TechWith AnnUvere
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять