aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

api_gateway_policy_file no longer works - error #2065

Open jacksimpsoncartesian opened 1 year ago

jacksimpsoncartesian commented 1 year ago

I recently switched to a new AWS account and took a Chalice project with me that was working perfectly - I was using 'api_gateway_policy_file' to point to a file in the '.chalice' directory.

Now with the new AWS login, when I try to deploy, it fails with this error:

Invalid policy document. Please check the policy syntax and ensure that Principals are valid.

I manually created a policy and role in the console, pointed the Chalice app to that, and it works fine, however if I copy the valid json into a file, the deploy fails with that error.