Open cjmcmurtrie opened 1 year ago
Think I got to the bottom of this. There were some policies attached to the role (which I had attached to it at some time in the past in the AWS console), and these were preventing deployer
from deleting the role, to then construct the new one with the custom policy.
By removing the policies in the console I was able to deploy successfully.
Is this behaviour you expect and want to keep? Would you like to close this, or is any other info or discussion helpful to you?
With the same call to
chalice deploy
I am deploying a REST API and a lambda function. This is so that I can run the Lambda function asynchronously after responding to the request.The deployed API Lambda does not have permission automatically to invoke
api-dev-testFunction
. This can be fixed by updating the policy in the AWS console but it must be done on every deployment.To avoid this, I created a policy file
.chalice/policy-dev.json
with the policy configuration, which is like this:The
.chalice/config.json
looks like this, withautogen_policy
set to false, and pointing to the above policy filepolicy-dev.json
:After
chalice deploy
, the API works as expected, but an error is reported in the console. Here is the stack trace:Any ideas on the meaning of this error, and how to correct it?
Many thanks to you!