SNS send file attachment

0

My one AWS hosted application need to send PDF or DOC or JPG any format files to http, SQS , https type subscriptions through SNS. Is it possible? Can you please provide any AWS reference tutorial link related for this? If not possible what kind of AWS Service will help me to achieve this using Messaging Service. Thanks in advance

2개 답변
1

SNS is a notification service and isn't built to send attachments. You can use the next pattern: Put your file as an object in S3; Send notification in SNS with the pointer to the S3 object. You'll need to define the permissions for the bucket and the object. Suggest to review: https://docs.aws.amazon.com/lambda/latest/dg/with-s3-tutorial.html and https://docs.aws.amazon.com/lambda/latest/dg/with-sns-example.html

AWS
Vlad
답변함 2년 전
  • SNS shall I publish byte array message instead string and so that my subscriber read bye array convert to file put in filenet? Is it possible SNS put byte array message? Please advise

1

SNS is designed to send messages, it's not designed to send files (especially large ones). You can send Base64-encoded binary data object, considering the max message size of 256KB.

See https://docs.aws.amazon.com/sns/latest/api/API_MessageAttributeValue.html for details.

For larger payloads see the pattern described in https://docs.aws.amazon.com/sns/latest/dg/large-message-payloads.html

AWS
Vlad
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠