You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, in the amplify/auth/post-confirmation/handler.ts, this line const { resourceConfig, libraryOptions } = await getAmplifyDataClientConfig(env) fails to generate the resourceConfig because the isDataClientEnv(env) used in the getAmplifyDataClientConfig() always returns false.
Code below taken from here in the recent pull commit 2224.
Environment information
Describe the bug
The doc shows an example of how to use
defineAuth
anddefineFunction
to create Cognito post confirmation Lambda trigger. Another related section is grant Lambda function access to API.When name is given in the
defineData()
, the generatedenv
that start with theAMPLIFY_DATA
prefix are replaced with the given name.Without name given (default):
With name given:
In this case, in the
amplify/auth/post-confirmation/handler.ts
, this lineconst { resourceConfig, libraryOptions } = await getAmplifyDataClientConfig(env)
fails to generate theresourceConfig
because theisDataClientEnv(env)
used in thegetAmplifyDataClientConfig()
always returnsfalse
.Code below taken from here in the recent pull commit 2224.
Reproduction steps
Follow the example in the doc with an additional step to add the name to
defineData()
.defineData()
post-confirmation
resource fileamplify/auth/post-confirmation/resource.ts
:post-confirmation
handler fileamplify/auth/post-confirmation/handler.ts
:amplify/auth/resource.ts
The text was updated successfully, but these errors were encountered: