Error on amplify push: AmplifyResourcesPolicy - The policy failed legacy parsing
See original GitHub issueBefore opening, please confirm:
- I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
14.15.3
Amplify CLI Version
7.6.3
What operating system are you using?
Mac
Amplify Categories
function
Amplify Commands
push
Describe the bug
I’m pushing updates which include pointing a dynamdb stream to a lambda. amplify push fails with:
UPDATE_FAILED AmplifyResourcesPolicy AWS::IAM::Policy Thu Dec 09 2021 12:33:24 GMT-0700 (Mountain Standard Time) The policy failed legacy parsing (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: 7dff3800-26e1-4b1b-a16c-fe581d7e39cc; Proxy: null)
Resource Name: ampli-Ampl-<redact> (AWS::IAM::Policy) Event Type: update Reason: The policy failed legacy parsing (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: 7dff3800-26e1-4b1b-a16c-fe581d7e39cc; Proxy: null) URL: <redact>
Resource Name: LambdaTriggerPolicyRx (AWS::IAM::Policy) Event Type: create Reason: Resource creation cancelled
Resource Name: EssDynamoStreamFn (AWS::Lambda::Function) Event Type: update Reason: Resource update cancelled URL: <redact>
Expected behavior
amplify push should work with no issues
Reproduction steps
Not sure. Just happens in my env. I tried to revert to 7.5.5 and the error is still there.
GraphQL schema(s)
# Put schemas below this line
Log output
# Put your logs below this line
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Hey somehow, the issue resolved itself! I did amplify function update, and though I didn’t make any changes, amplify push now works again, so you’re free to close.
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.