Closed
Description
Key information
- RFC PR:
- Related issue(s), if known:
- Area: Utilities-Parameters-DynamoDB
- Meet tenets: Yes
- Approved by: ''
- Reviewed by: ''
Summary
Add possibility to use this library in AWS lambda with DynamoDB local that run on docker.
Motivation
When you want to test your lambda locally you could user DynamoDB local to avoid to interact with remote database. Right now the parameter endpoint_url
is missing on dynamodb provider configuratio
Proposal
def __init__(
self,
table_name: str,
key_attr: str = "id",
sort_attr: str = "sk",
value_attr: str = "value",
endpoint_url: Optional[str] = None,
config: Optional[Config] = None,
):
"""
Initialize the DynamoDB client
"""
config = config or Config()
self.table = boto3.resource("dynamodb", endpoint_url=endpoint_url, config=config).Table(table_name)
Insert enpoindt_url
parameter as init config of dynamodb provider
If this feature should be available in other runtimes (e.g. Java, Typescript), how would this look like to ensure consistency?
Drawbacks
Why should we not do this? Few people are interested on local dynamodb
Do we need additional dependencies? Impact performance/package size? no
Rationale and alternatives
- What other designs have been considered? Why not them?
- What is the impact of not doing this?
Unresolved questions
Optional, stash area for topics that need further development e.g. TBD
Metadata
Metadata
Assignees
Type
Projects
Status
Triage
Relationships
Development
No branches or pull requests
Activity
heitorlessa commentedon Mar 29, 2021
Ciao Riccardo!! Definitely on-board with that. There are two things I wanted to do here but might be able to do only next week:
I tagged this to make sure it's done and available in the next minor release ;)
Thank you!
rtrive commentedon Mar 30, 2021
Ciao @heitorlessa!!
i build a small PR only for
endpoint_url
and i will try to merged it asap :)rtrive commentedon Mar 30, 2021
#376
heitorlessa commentedon Mar 31, 2021
Merged 🎉 this will be out in the next release hopefully by next EOW
heitorlessa commentedon Apr 9, 2021
hey @rtrive this is now out as part of 1.14.0 release ;) Thanks a lot for contributing it!
rtrive commentedon Apr 9, 2021
it's a pleasure ;)