sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

Delete AWS Lambda functions created by tests regularly

Open antonpirker opened this issue 1 year ago • 1 comments

Our AWS Lambda test suite is creating real Lambda functions in AWS.

We need a Lambda function that runs every Sunday that will remove all Lambda functions named test_*.

Run Lambda function ever X days: https://stackoverflow.com/questions/56979740/how-to-run-aws-lambda-every-6-hours

Delete Lambda function from Python SDK: https://docs.aws.amazon.com/lambda/latest/dg/example_lambda_DeleteFunction_section.html

antonpirker avatar Feb 07 '24 08:02 antonpirker

We have a bash script that does this: https://github.com/getsentry/sentry-python/blob/master/scripts/aws-cleanup.sh

So maybe we can just invoke this in an AWS Lambda function (or somewhere else)

antonpirker avatar Feb 07 '24 08:02 antonpirker