-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add APIs prop to GuLambdaFunction #28
Conversation
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.
Looks good! Won't approve as I contributed but nice work getting tests on it
e5a5c2d
to
735e50d
Compare
…l/google-chat-bots-migration
it("should create a lambda function with an api gateway", () => { | ||
const stack = new Stack(); | ||
|
||
new GuLambdaFunction(stack, "lambda", { |
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.
We probably want GuLambdaFunction
to take in a GuStack
as it's first argument, rather than a Construct
as this will provide the stack and stage params and tags for free.
What does this change?
This PR adds a new
apis
prop to theGuLambdaFunction
to which an array of config forLambdaRestApis
can be passed. This means that lambdas with an API gateway can be instantiated in one go.Does this change require changes to existing projects or CDK CLI?
This is a new, non-breaking feature so existing stacks won't require changes. Currently no migrated stacks make use of this feature but soon to be migrated stacks will.
How to test
A new snapshot has been added which includes the extra resources created when the
apis
prop is used. Further testing can be done by migrating a stack that already uses lambdas and API gateway and verifying that the output is the same.How can we measure success?
Stacks which have api gateways along with lambda functions can specify them via the
apis
prop for simpler configuration.Have we considered potential risks?
n/a
Images
n/a