- Newest
- Most votes
- Most comments
The error you're encountering suggests there might be an issue with how the model fields are defined or accessed in your Amplify Gen2 setup. The "fields7[fieldName]" error is likely an internal error from the Amplify library, indicating it's having trouble accessing or processing the fields of your School model.
Given that you can read the data but not update it, there are a few potential issues to consider:
-
Authorization: Your authorization rules allow only the "Admin" group to perform updates. Make sure the user you're using to test the update operation is actually in the "Admin" group.
-
Model definition: There might be an issue with how your School model is defined. Double-check your schema definition to ensure all fields, especially 'YYYY', are correctly specified.
-
Field visibility: The fact that
client.models.School.fieldsis undefined is unusual and could indicate a problem with how the model is being generated or accessed in your client-side code. -
Auth mode: You're using "userPool" as the authMode. While this is generally correct for authenticated operations, ensure that your Amplify configuration is set up to use Cognito User Pools correctly.
To troubleshoot:
- Verify that your user is in the "Admin" group.
- Double-check your schema definition for the School model.
- Ensure that your Amplify CLI version is up to date.
- Try using the Amplify Console to view and verify your data model.
- Check if there are any errors during the Amplify push or codegen processes.
If the issue persists, you might want to try recreating the data model or reaching out to AWS support for more detailed assistance, as this seems to be an unusual error that might require a deeper look into your specific setup.
Sources
How to Build Next.js Apps with Authentication using AWS Amplify and Auth0 | Front-End Web & Mobile
Full Stack Development - Web and Mobile Apps - AWS Amplify
Issue with amplify gen2 file upload using Storage: access denied | AWS re:Post
I ran into this issue because I was using allow.owner() as one of my auth rules, and even when owner was set properly on the record, I would get the weird error mentioned by OP. This has been logged as an issue here, and I think the issue has been erroneously marked as "fixed" (the fix in the issue is to use "UserPool" instead of "API Key" as the auth mechanism, but I'm already doing that). My code can be found at one of the last comments (comment made by keithrz, Monday Mar 24)
One workaround is to remove allow.owner() from the list of authorization rules, but I do not like that approach.
answered a year ago
It looks like my issue is actually this isue: https://github.com/aws-amplify/amplify-data/issues/419
Relevant content
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 4 years ago

Verify that your user is in the "Admin" group. Double-check your schema definition for the School model. Ensure that your Amplify CLI version is up to date. Try using the Amplify Console to view and verify your data model. Check if there are any errors during the Amplify push or codegen processes.
I checked all those steps... without success...