Skip to content

Allow override of aws_* configs in global settings #1272

@sirianni

Description

@sirianni

For testing with dynamodb-local I'm able to override the host and region using global settings, but not aws_secret_key_id and aws_secret_access_key.

As I understand it, the workarounds are either

  1. Specify them on every Meta class (hardcoded in this example, would come from shared config file in a real application)
class WidgetModel(Model):
    class Meta:
        table_name = "widgets"
        aws_access_key_id = "bogus"
        aws_secret_access_key = "bogus"
  1. Set them as environment variables before running the process
export AWS_SECRET_KEY_ID=bogus
export AWS_SECRET_ACCESS_KEY=bogus

(this is what pynamodb itself does for unit tests)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions