S3DeleteObjectsOperator

Amazon

To enable users to delete single object or multiple objects from a bucket using a single HTTP request.

View Source

Last Updated: May. 7, 2021

Access Instructions

Install the Amazon provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

bucketstrName of the bucket in which you are going to delete object(s). (templated)
keysstr or listThe key(s) to delete from S3 bucket. (templated)When keys is a string, it's supposed to be the key name of the single object to delete.When keys is a list, it's supposed to be the list of the keys to delete.You may specify up to 1000 keys.
prefixstrPrefix of objects to delete. (templated) All objects matching this prefix in the bucket will be deleted.
aws_conn_idstrConnection id of the S3 connection to use
verifybool or strWhether or not to verify SSL certificates for S3 connection. By default SSL certificates are verified.You can provide the following values:False: do not validate SSL certificates. SSL will still be used,but SSL certificates will not be verified.path/to/cert/bundle.pem: A filename of the CA cert bundle to uses.You can specify this argument if you want to use a different CA cert bundle than the one used by botocore.

Documentation

To enable users to delete single object or multiple objects from a bucket using a single HTTP request.

Users may specify up to 1000 keys to delete.

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `__init__.py` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?