-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat: Add support for custom Lambda function email senders in Auth construct #2087
Merged
Merged
Changes from 122 commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
743354e
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 ab7f76f
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 7c55adc
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 36727ba
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 aa2f7d9
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 0302517
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 0adf873
chore: add changeset
vigy02 a5b5d3c
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 753701a
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 955cecc
fix: clearing the .amplify/generated/env/ before synthesis
vigy02 2a2b188
Merge branch 'main' of https://github.com/vigy02/amplify-backend
vigy02 fc0be7e
fix: Clear generated env directory before shim generation
vigy02 6c916e0
fix: Clear generated env directory before shim generation
vigy02 cab3f1a
fix: Clear generated env directory before shim generation
vigy02 954e1c0
fix: Clear generated env directory before shim generation
vigy02 d9212d8
chore: add changeset
vigy02 c09e1ee
fix: Clear generated env directory before shim generation
vigy02 05e1fd5
fix: Clear generated env directory before shim generation
vigy02 7714224
Merge branch 'issue-dir-clean'
vigy02 91faece
Merge branch 'aws-amplify:main' into main
vigy02 5977d8f
Merge branch 'aws-amplify:main' into main
vigy02 4c6616b
Merge branch 'main' of github.com:vigy02/amplify-backend
vigy02 cb908ed
feat: adding custom lambda function trigger for email
vigy02 dbbb9b8
feat: adding custom lambda function trigger for email
vigy02 2f7e6e8
feat: adding custom lambda function trigger for email
vigy02 f981039
feat: adding custom lambda function trigger for email
vigy02 e5ada8b
feat: adding custom lambda function trigger for email
vigy02 2cc04a9
feat: adding custom lambda function trigger for email
vigy02 1794ad0
feat: adding custom lambda function trigger for email
vigy02 e6c6730
feat: adding custom lambda function trigger for email
vigy02 4471aec
feat: adding custom lambda function trigger for email
vigy02 2b17234
feat: adding custom lambda function trigger for email
vigy02 61e10d8
feat: adding custom lambda function trigger for email
vigy02 fdbc617
feat: adding custom lambda function trigger for email
vigy02 5806d7f
feat: adding custom lambda function trigger for email
vigy02 e1ca822
feat: adding custom lambda function trigger for email
vigy02 f012a51
feat: adding custom lambda function trigger for email
vigy02 cb8f50d
feat: adding custom lambda function trigger for email
vigy02 6e7ab39
feat: adding custom lambda function trigger for email
vigy02 8fdd181
feat: adding custom lambda function trigger for email
vigy02 2187829
feat: adding custom lambda function trigger for email
vigy02 c86be92
feat: adding custom lambda function trigger for email
vigy02 c5f6ad4
feat: adding custom lambda function trigger for email
vigy02 f8f1c6a
Merge branch 'main' of github.com:vigy02/amplify-backend
vigy02 b8bb5a2
Merge branch 'aws-amplify:main' into main
vigy02 8e3f47d
cleanup
vigy02 b291851
chore: removed unwanted changesets
vigy02 206ec4e
chore: preparing for merge
vigy02 ad776e7
chore: preparing for merge
vigy02 eb24c3e
chore: preparing for merge
vigy02 3283dfd
feat: added a functionality to translate auth-props for custom fucnti…
vigy02 eac8809
chore: added changeset
vigy02 d9d7cae
chore: added new API
vigy02 872f88b
feat: added a functionality to translate auth-props for custom fucnti…
vigy02 afe3d89
feat: added a test case to cover custom function in backend-auth
vigy02 c829edf
Merge branch 'aws-amplify:main' into main
vigy02 fbfc8fe
feat: added a test case to cover custom function in backend-auth
vigy02 a4d17e8
feat: added a test case to cover custom function in backend-auth
vigy02 699986b
feat: added a test case to cover custom function in backend-auth
vigy02 b22de18
feat: added a test case to cover custom function in backend-auth
vigy02 f43703d
feat: narrowed down the permission by updating the conditions
vigy02 d1ff4aa
Refactored the code
vigy02 3262d3f
Merge branch 'aws-amplify:main' into main
vigy02 15b2fbf
Refactored the code
vigy02 5e02689
added a test case for checking lambdaTrigger={} empty condition
vigy02 606570a
added a test case for checking lambdaTrigger={} empty condition
vigy02 1cce05c
Merge branch 'main' into e2e/vigy/feature/custom-email-function
vigy02 7a5629b
Merge Branch
vigy02 16e07ed
Merge branch 'main' into e2e/vigy/feature/custom-email-function
vigy02 029b4d0
Merge Branch
vigy02 57daf18
Merge Branch
vigy02 04bca21
Merge Branch
vigy02 7d48cbe
Merge Branch
vigy02 7847881
Merge Branch
vigy02 43b7da0
Merge Branch
vigy02 e0532f3
Merge Branch
vigy02 7c007da
Merge Branch
vigy02 9178e8b
Merge Branch
vigy02 570de9e
fixed the code to use addTrigger instead of manually setting up permi…
vigy02 8a272d1
added KMS Key for customEmailSender
vigy02 c558111
changed KMS key to not read-only
vigy02 37b6d5d
changed the test case to include lambdaArn
vigy02 324afb6
add a test case validation for KMS key
vigy02 10444c7
Merge branch 'main' of github.com:vigy02/amplify-backend
vigy02 0c04155
Merge branch 'main' into feature/custom-email-function
vigy02 36160e5
fixed the code to use addTrigger instead of manually setting up permi…
vigy02 fff5cde
added KMS Key for customEmailSender
vigy02 22b8840
changed KMS key to not read-only
vigy02 a1b4056
changed the test case to include lambdaArn
vigy02 1b1a263
add a test case validation for KMS key
vigy02 7e688f6
detect transform errors with multiple errors (#2102)
rtpascual 4772b2e
Add minify option to defineFunction (#2093)
fossamagna 1d64301
upgrade constructs (#2103)
sobolk 49b46d6
Remove deprecated messages field from event (#2106)
sobolk 7119b35
detect generic CFN stack creation errors (#2108)
rtpascual 0480694
Fix cdk tests when new dependencies are shipped to npm. (#2107)
sobolk 793927a
Merge branch 'main' into feature/custom-email-function
vigy02 7665597
Merge branch 'feature/custom-email-function' of github.com:vigy02/amp…
vigy02 487f586
API changes
vigy02 2267f2a
Merge branch 'main' into feature/custom-email-function
vigy02 38c05f5
Update API changes
vigy02 be0d21e
Merge branch 'aws-amplify:main' into feature/custom-email-function
vigy02 50f7e94
Added kmsKeyArn for custom user KMS keys
vigy02 984bd69
chore: added changesets and updated API's
vigy02 70ae8a1
chore: added changesets
vigy02 fe1aaf1
Added integration tests for customEmailSender
vigy02 e06162b
updated the API files to reflect master
vigy02 b8d54a6
feat: added customSenderEmail with types and added exceptions to esli…
vigy02 3b03d3c
Merge branch 'main' into feature/custom-email-function
vigy02 3df2842
chore: Updated API
vigy02 4f21f21
chore: Updated API
vigy02 c7e53cc
chore: updated API
vigy02 e7d335c
Delete packages/ai-constructs/API.md
vigy02 30ffca8
chore: Updated API
vigy02 7411f34
chore: delete unused file
vigy02 1c6bef9
chore: update changeset
vigy02 65cbf67
chore: update changeset
vigy02 3e898fc
chore: Updated API and changeSets
vigy02 445e0a3
chore: Updated the API from main
vigy02 e4f879b
API updates to resolve conflicting naming
vigy02 a26da97
Updated the types in backend-auth
vigy02 3e49d70
chore: Updated changesets
vigy02 f5da56c
Added custom Email handler function and refactored the types of auth-…
vigy02 223181c
chore: updated API
vigy02 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@aws-amplify/auth-construct': minor | ||
'@aws-amplify/backend-auth': minor | ||
'@aws-amplify/backend': minor | ||
'@aws-amplify/integration-tests': minor | ||
--- | ||
|
||
Add support for custom Lambda function email senders in Auth construct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ import { | |
UserPoolIdentityProviderSamlMetadata, | ||
UserPoolSESOptions, | ||
} from 'aws-cdk-lib/aws-cognito'; | ||
import { IFunction } from 'aws-cdk-lib/aws-lambda'; | ||
export type VerificationEmailWithLink = { | ||
/** | ||
* The type of verification. Must be one of "CODE" or "LINK". | ||
|
@@ -380,6 +381,14 @@ export type CustomAttribute = | |
export type UserAttributes = StandardAttributes & | ||
Record<`custom:${string}`, CustomAttribute>; | ||
|
||
/** | ||
* CustomEmailSender type for configuring a custom Lambda function for email sending | ||
*/ | ||
export type CustomEmailSenderConstruct = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, this should not end with *Construct in the name |
||
handler: IFunction; | ||
kmsKeyArn?: string; | ||
}; | ||
|
||
/** | ||
* Input props for the AmplifyAuth construct | ||
*/ | ||
|
@@ -417,11 +426,15 @@ export type AuthProps = { | |
*/ | ||
senders?: { | ||
/** | ||
* Configure Cognito to send emails from SES | ||
* Configure Cognito to send emails from SES or a custom message trigger | ||
* SES configurations enable the use of customized email sender addresses and names | ||
* Custom message triggers enable the use of third-party email providers when sending email notifications to users | ||
* @see https://docs.amplify.aws/react/build-a-backend/auth/moving-to-production/#email | ||
vigy02 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-email-sender.html | ||
*/ | ||
email: Pick<UserPoolSESOptions, 'fromEmail' | 'fromName' | 'replyTo'>; | ||
email: | ||
| Pick<UserPoolSESOptions, 'fromEmail' | 'fromName' | 'replyTo'> | ||
| CustomEmailSenderConstruct; | ||
}; | ||
/** | ||
* The set of attributes that are required for every user in the user pool. Read more on attributes here - https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
or
CustomEmailSenderOptions
This is not a construct. It has a reference to IFunction inside but this type is not implementing
Construct
super class.