-
Notifications
You must be signed in to change notification settings - Fork 64
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
Feature: allow all optional props for the NodejsFunction CDK construct to be passed via defineFunction in @aws-amplify/backend-function #1971
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 1fab1ab The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hey @ataylorme 👋 thanks for taking the time to file this and your interest in contributing! A few of these properties will require values that rely on CDK scope like VPC configuration, or enums that must be imported from CDK. Are there any particular properties you're interested in? |
@josefaidt the ones I am personally interested in are the log related options ( Other users will have other needs, which is why I made the PR to support all options.
In this case it would be up to the user to import those types/values and pass valid parameters that satisfy |
Hey @ataylorme thanks for the clarification! Coincidentally enough we have a PR filed for exposing function logging props #2245 We'll work to evaluate exposing other NodejsFunctionProps in the meantime 🙂 |
Oh nice! I have been manually provisioning a log group in CDK with retention settings to match the Lambda names. That PR will make it much simpler. |
Problem
defineFunction
does not allow all props available on NodejsFunctionIssue number, if available: #1968
Changes
NodejsFunction
viadefineFunction
retryAttempts
prop toNodejsFunction
viadefineFunction
Validation
I created a unit test that validates the presence of
AWS::Lambda::EventInvokeConfig
withMaximumRetryAttempts
in the generated CloudFormation whenretryAttempts
is passed as a prop todefineFunction
Checklist
run-e2e
label set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.