Open fossamagna opened 11 months ago
Hey @fossamagna, Thank you for bringing up this issue and raising the PR. We've successfully reproduced the issue based on the description provided. Therefore, we're categorizing this as a bug for the team's thorough evaluation and review of the PR.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v18.18.1
Amplify CLI Version
12.8.2
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
N/A
Describe the bug
Grant
public
accessread
operation to theTodo
model. Also, allowread
,create
, andupdate
operations forprivate
access.The policy of unauthRole generated by amplify:
The following three resource definitions are not necessary because only
read
operations are allowed forpublic
access.The policy of authRole generated by amplify:
The following a resource definition is not necessary because only
read
,create
, andupdate
operations are allowed forprivate
access.Expected behavior
Resource definitions described above as unnecessary should not be included in the generated policy.
Reproduction steps
git clone git@github.com:fossamagna/amplify-unnecessary-iam-role-resources.git
amplify push
Project Identifier
No response
Log output
Additional information
https://github.com/aws-amplify/amplify-category-api/issues/308#issuecomment-1129357188 may have the same issue.
Before submitting, please confirm: