Fork me on GitHub
#aws
<
2017-12-06
>
valtteri07:12:50

@ggaillard How about https://github.com/mcohen01/amazonica#sns ? You could create a topic and subscribe to it in each instance. You can include “publisher” in the message attributes so you can make the publisher ignore messages from itself. If you just need pub/sub and you’re on AWS, I recommend SNS because it’s completely managed.

ggaillard11:12:23

I didn't knew sns supported this use case ! Thank you 🙂

plins16:12:40

@valtteri, Im using amazonica and i suspect that theres a shared/cached AWS*Client, so all my threads are using the same client … not sure if there is an option to turn it off … ill try using the interop with java and create the client myself

valtteri19:12:48

@plins I’m sorry I don’t know Amazonica internals well enough to help you. Maybe someone else here knows if there’s a nice way to instantiate more clients?

plins20:12:27

the reason I suspect this is on the docs Note: The first function called (for each distinct AWS service namespace, e.g. amazonica.aws.ec2) creates an Amazon*Client, which is effectively cached via memoization. Therefore, if you explicitly pass different credentials maps to different functions, you will effectively have different Clients.

plins20:12:23

there should be a better way beside creating one credential per thread (or the java approach)