Why does the CDK example include a UUID api? #1659
-
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: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
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.
-
We have refactored the examples some time ago to remove the API mentioned above, also in part because of this discussion evidencing it was confusing. |
Beta Was this translation helpful? Give feedback.
We have refactored the examples some time ago to remove the API mentioned above, also in part because of this discussion evidencing it was confusing.