Referring to existing Dynamo DB in Lambda functions

90 views Asked by At

I'm trying to read an existing dynamo DB in Lambda function, but resources in YAML creates a new table. If I could do that, someone please help me how? Also I need to use an existing S3 bucket

1

There are 1 answers

0
Leeroy Hannigan On BEST ANSWER

If you change your resources frequently or even occasionally then you should use Parameter Store. This will allow your lambda function to pick up the correct table names at runtime.

Anytime you update/change your table to have a new name, you just update the value in parameter store and your Lambda will automatically refer to the new table.

https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html