New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple configurations #403
Comments
Could you describe a case when this feature is needed? |
Thank you, for example, in the same rails project, you need to connect two Amazon's DynamoDB, different access_key, secret_key, region |
I see. Will add this feature request for the next minor release in 3-4 months. So actually there are two options:
Let's consider both options. I am still not sure whether we need only one of them or both. Option #1Let's consider an example: class User
include Dynamoid::Document
configure do |config|
config.access_key = 'REPLACE_WITH_ACCESS_KEY_ID'
config.secret_key = 'REPLACE_WITH_SECRET_ACCESS_KEY'
config.region = 'us-west-2'
end
end Option #2Consider another example: class User
include Dynamoid::Document
end
Dynamoid.configure(access_key: '', secret_key: '', region: '') do
User.count
end |
thank you very much! |
I agree, option 1 seems preferable. |
It would be very helpful, in my case I'm trying to use a different namespace for one model and it's not possible. |
I'd love to see a per-model configuration as well. This helps when needing to deal with data that's sourced from multiple regions (and the source applications can't be housed in a single region). |
Will prioritize this task 👍 . |
@andrykonchin any updates on this? |
No, there is no update yet. |
Support two or more aws configuration or specify configuration for model
The text was updated successfully, but these errors were encountered: