1

I have a lambda function that triggers when any new objectCreated(s3:Objectcreated.*) in a Bucket A-prod, This lambda process the file saves the result in B-prod.

Now I want to restore this data on QA, I am writing a script for same and I don't want to process file again. For my case I will copy B-prod to B-qa and A-prod to A-qa via a python script.

  1. It would be great if I can disable the lambda trigger temporarily, But It is not possible as aws do not allow disabling anymore(It is grey on aws console).
  2. I can delete trigger from aws console but can't find how to do it from python or cli. AWS Console Screenshot Lambda Function Trigger

2 Answers 2

1

can't find how to do it from python or cli.

In boto3 you use put_bucket_notification_configuration to provide empty notifications.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, It worked like a charm.That's what I was looking for.
1

For anyone looking for a temporary disable from AWS console without deleting the trigger, here's a work-around. Note that this is not meant as a permanent solution. I had to disable temporarily and it works.

Go to S3 > Buckets > your-bucket > Properties

Scroll down to "Event Notifications"

You should see your Lambda Function in Destination, Choose Edit, Uncheck "All Object Create Events", Check another event type that will not occur in your process, such as "Object Tagging", Save.

When finished, enable by checking the "Object Create Events" and unchecking the other event.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.