Skip to content
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

Documentation for minimal version of Iot To Lambda To Dynamo #886

Closed
Gamecock opened this issue Jan 10, 2023 · 2 comments · Fixed by #894
Closed

Documentation for minimal version of Iot To Lambda To Dynamo #886

Gamecock opened this issue Jan 10, 2023 · 2 comments · Fixed by #894
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged

Comments

@Gamecock
Copy link

Reproduction Steps

N/A

Error Log

N/A

Environment

N/A

Other

https://aws.amazon.com/blogs/aws/aws-solutions-constructs-a-library-of-architecture-patterns-for-the-aws-cdk/
shows how to link a dynamo table table

I can add this to the example

`iotToLambdaToDynamo.lambda_function.add_environment("TABLE_NAME", iotToLambdaToDymamo.dynamo_table.table_name)

or can take a more opinionated approach and make that happen as part of the pattern, but I have not seen setting ENV variables in any other construct. Open to suggestions.


This is 🐛 Bug Report

@Gamecock Gamecock added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Jan 10, 2023
@Gamecock Gamecock changed the title Documentation for minimal version Documentation for minimal version of Iot To Lambda To Dynamo Jan 10, 2023
@biffgaut
Copy link
Contributor

biffgaut commented Jan 10, 2023

This is actually a deficiency in the docs for that construct. aws-iot-lambda-dynamodb instantiates an aws-lambda-dynamodb construct internally - the docs for that construct confirm that an environment variable is set for the Lambda function: DDB_TABLE_NAME. It is a convention that when an environment variable is being set, we expose an optional property so clients can customize that name (e.g. - if a Lambda function is associated with 2 DDB tables), so in addition to updating the docs to show that an environment variable is getting set we'll also add the ability to customize the environment variable name to this interface similarly to what you see on aws-lambda-dynamodb.

Thanks for the heads up - we'll leave this issue open for the time being to remind to get this done.

@biffgaut
Copy link
Contributor

biffgaut commented Feb 9, 2023

This has been addressed in release 2.31.0

@biffgaut biffgaut closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged
Projects
None yet
2 participants