api_gateway_policy_file no longer works - error
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
Research direction
Start by reproducing deployment with api_gateway_policy_file pointing to a JSON file in the .chalice directory, using the policy that works when created manually in the AWS console. Compare the file-based deployment path with the console-created policy and verify whether the generated API Gateway policy contains valid Principals. Done means the same valid JSON deploys successfully through Chalice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- api, authorization, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100