Open rtpascual opened 2 weeks ago
Adds breakCircularDependency (naming can change) to defineFunction props. If this is set to true, splits function into its own stack based on the function's name.
breakCircularDependency
defineFunction
// amplify/auth/resource.ts export const preSignUp = defineFunction({ name: 'preSignUp', entry: './presignup/handler.ts', breakCircularDependency: true, }); export const randomFunction = defineFunction({ name: 'randomFunction', entry: './randomefunction/handler.ts', }); export const auth = defineAuth({ ... triggers: { preSignUp }, });
// amplify/backend.ts export const backend = defineBackend({ auth, data, randomFunction, preSignUp, }); const randomFunctionStack = backend.randomFunction.stack; // function stack const preSignUpStack = backend.preSignUp.stack; // presignup stack
Corresponding docs PR, if applicable:
run-e2e
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Changes
Adds
breakCircularDependency
(naming can change) todefineFunction
props. If this is set to true, splits function into its own stack based on the function's name.Corresponding docs PR, if applicable:
Validation
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.