Closed raspasov closed 9 years ago
Correct me if I'm wrong, but Faraday allows you to provide :endpoint
which kind of determines the region? What would be the difference when using :region
?
I believe you're correct! I'm pretty new to DynamoDB - thanks for the tip!
I probably got confused by the documentation on the front page which says: " :endpoint "http://localhost:8000" ; For DynamoDB Local " i.e. I thought that's a thing only for local development.
Cheers, Rangel
@raspasov: Hi Rangel, so I'm closing this? Feel free to re-open if you're still having any trouble. @tlipski: Thanks a lot Tomek, much appreciated :-)
Cheers!
Yes, everything works great, thanks!
I see you guys updated the README - looks great now, probably will avoid any future confusion for people new to Dynamo like me.
Cheers, Rangel
I think it would be a good to reopen this one and support :region
as an alternative to :endpoint
, as the two are not quite equivalent. The AWS client provides some valuable functionality when you use region.
Imagine the following use-case: We want to use faraday to interact with a bunch of different tables in different regions. Naturally, we'd like to define only region and table-name for each table. Using the Amazon SDK this is possible, because it understands that, for instance, the endpoints for the cn-north-1 region end in amazonaws.com.cn
instead of amazonaws.com
.
With faraday, I think I have to write this logic myself, because there's no way of setting the 'region'.
Added ability to specify AWS region via a :region key in the client-opts map. Sorry the formatting got a bit off on some lines, feel free to copy/paste the code if you'd like and make the change yourself.
Thanks, very nice library!
Rangel