Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

103
Visualizações
Subscribe to S3 bucket notifications SNS Topic directly on EC2 instance

I'd like to subscribe to a S3 bucket notifications SNS Topic directly on an EC2 instance where I have a script running that's listening for a S3 bucket update event.

I assume I need to do:

aws sns subscribe --topic-arn [ARN of S3 bucket update topic] --protocol [email, email-json, http, https, or sqs]

What protocol would make sense in this context?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

To answer your question, you would need to have an endpoint on your ec2 instance that can receive and process the messages from SNS so the protocol would be http or https (depending how you setup the server on your ec2 instance). You can read more about this in Sending Amazon SNS Messages to HTTP/HTTPS Endpoints

Note sure how you wrote your script but if its using python/java/javascript or anything that can be supported by lambda it would be much better to deploy your code in a lambda function and have the message sent to this lambda, you only pay when its executed (in the other case, your ec2 instance needs to be always up and running to listen to messages). lambda is a supported protocol of sns subscription

A third option is to introduce SQS in the picture, you will run in asynchronous mode (depends on your requirement if its an option or not) you would choose sqs as the protocol value of your SNS message (read Sending Amazon SNS Messages to Amazon SQS Queues for more info) and you would need your ec2 webservice to pick the message in sqs queue

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda