Skip to content

Commit bc73c5c

Browse files
committed
Add warning after data client handler examples
1 parent f5f6616 commit bc73c5c

File tree

2 files changed

+12
-0
lines changed
  • src/pages/[platform]/build-a-backend
    • data/customize-authz/grant-lambda-function-access-to-api
    • functions/examples/create-user-profile-record

2 files changed

+12
-0
lines changed

src/pages/[platform]/build-a-backend/data/customize-authz/grant-lambda-function-access-to-api/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ export const handler = async (event) => {
115115
}
116116
```
117117

118+
<Callout warning>
119+
When configuring Amplify with `getAmplifyDataClientConfig`, your function consumes schema information from an S3 bucket
120+
created during backend deployment with grants for the access your function need to use it. Any changes to this
121+
bucket outside of backend deployment may break your function.
122+
</Callout>
123+
118124
Once you have generated the client code, update the function to access the data. The following code creates a todo and then lists all todos.
119125

120126
```ts title="amplify/functions/data-access.ts"

src/pages/[platform]/build-a-backend/functions/examples/create-user-profile-record/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ export const handler: PostConfirmationTriggerHandler = async (event) => {
122122

123123
```
124124

125+
<Callout warning>
126+
When configuring Amplify with `getAmplifyDataClientConfig`, your function consumes schema information from an S3 bucket
127+
created during backend deployment with grants for the access your function need to use it. Any changes to this
128+
bucket outside of backend deployment may break your function.
129+
</Callout>
130+
125131

126132
Lastly, set the newly created Function resource on your auth resource:
127133

0 commit comments

Comments
 (0)