question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on amplify push: AmplifyResourcesPolicy - The policy failed legacy parsing

See original GitHub issue

Before 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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hishamcommented, Dec 9, 2021

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.

0reactions
github-actions[bot]commented, Feb 8, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Amplify - Failed to push due to Malformed Policy ...
I have an amplify project and was about to make a push (amplify push). However, the. push failed because of the. following error:...
Read more >
Adding Analytics permissions to lambda trigger function fails
I believe the problem is in the cloudformation-template.json, specifically where it defines AmplifyResourcesPolicy. It's trying to join together ...
Read more >
Lambda deploy: The policy failed legacy parsing (Service ...
This post is about an error I encountered after upgrading to Serverless 2.28. My solution is provided, but it probably isn't the best...
Read more >
Permissions boundaries workshop Build phase
Missing any of these items can result in problems and errors like "An error ... when calling the CreatePolicy operation: The policy failed...
Read more >
Getting 'The Policy Failed Legacy Parsing' When Creating An ...
Missing any of these items can result in problems and errors like An error occurred when calling the CreatePolicy operation: The policy failed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found