aws-samples / sagemaker-run-notebook

Tools to run Jupyter notebooks as jobs in Amazon SageMaker - ad hoc, on a schedule, or in response to events
Apache License 2.0
140 stars 68 forks source link

add multiple lambda function permission #9

Closed hjavanmard closed 2 years ago

hjavanmard commented 3 years ago

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?

tomfaulhaber commented 2 years ago

A release with this fix will be out soon.