app#

App defining an API Gateway and Lambda Function with a FastAPI app.

Note

Eric recommends never putting node.try_get_context() calls inside of a stack. Hiding those calls inside of a stack makes it very unintuitive to figure out what inputs you need to actually create a stack. Instead, write stacks and constructs assuming any required inputs will be passed as arguments to the constructor. Make the calls to try_get_context in the app.py.

In each stack/construct, use a dataclass, enum, or constants to define actual string constants used for ContextVars (inputs) and Cloudformation Outputs (outputs).