-
Notifications
You must be signed in to change notification settings - Fork 2
Add upsert lambda #280
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
base: main
Are you sure you want to change the base?
Add upsert lambda #280
Conversation
infrastructure/terraform/components/api/module_lambda_upsert_letter.tf
Outdated
Show resolved
Hide resolved
| }; | ||
|
|
||
| function createDocumentClient(): DynamoDBDocumentClient { | ||
| const ddbClient = new DynamoDBClient({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the region be passed in during creation?
Which region is used by default if you omit it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html :
- "The SDK for JavaScript doesn't select a Region by default. However, you can set the AWS Region using an environment variable, or a shared configuration config file."
- "Order of precedence for setting the Region": passed to constructor -> env var -> shared config file
From what I can tell, the Lambda service itself injects env vars depending on where it is deployed, and then the SDK will pick it up. We could be clearer and have fallbacks though when creating the clients, I think we need a tech debt for this because other Lambdas in the project are creating the clients like this as well
547f6b1
* swap partition and sort for letters * store changes and source, subject, billingref * unsafe marker * rename correctly
Description
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.