I receive the below error when I am trying to schedule a new cloud watch rule:
botocore.errorfactory.PolicyLengthExceededException: An error occurred (PolicyLengthExceededException) when calling the AddPermission operation: The final policy size (20563) is bigger than the limit (20480).
It seems since I created multiple scheduled run invoking the same lambda function the policy has gotten huge. I already have at least 40 scheduled job so far and probably adding more in future. I temporary comment out the lines which add lambda permission each time I create a new scheduled job and instead I let the lambda function to grant any access from a specified account.
Is there any permanent solution that it does not create permission each time it schedules a new job?
I receive the below error when I am trying to schedule a new cloud watch rule: botocore.errorfactory.PolicyLengthExceededException: An error occurred (PolicyLengthExceededException) when calling the AddPermission operation: The final policy size (20563) is bigger than the limit (20480).
It seems since I created multiple scheduled run invoking the same lambda function the policy has gotten huge. I already have at least 40 scheduled job so far and probably adding more in future. I temporary comment out the lines which add lambda permission each time I create a new scheduled job and instead I let the lambda function to grant any access from a specified account. Is there any permanent solution that it does not create permission each time it schedules a new job?