Why does the CDK example include a UUID api? #1659
Replies: 1 comment
-
Hi @coffeedome, the goal of the examples in the repository is to showcase usage of the Powertools utilities with projects deployed via CDK or SAM. The UUID API specifically is used here as a standalone REST API that accepts an HTTP request and returns a new UUID. As part of the This parameter is then later used by some of the functions (i.e. here or here) to obtain UUIDs. This allows us to showcase how to use the Parameters utility in your functions. I agree that this example is somewhat trite and that we could improve the example by showing how to retrieve something more useful from SSM / Secrets Manager / etc, however in this case we opted for keeping the example simple over usefulness. I hope this answers your question. |
Beta Was this translation helpful? Give feedback.
-
Why does the example include a class UuidApi extends Construct? (class UuidApi extends Construct {} section)? It seems to have nothing to do with the Items API in that same example.
Link to example:
powertools-lambda-typescript/examples/cdk/src/example-stack.ts
Line 110 in 4e6f662
Beta Was this translation helpful? Give feedback.
All reactions