Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

102
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda