helpers#
- pynamodb_mate.helpers.split_s3_uri(s3_uri: str) Tuple[str, str][source]#
Split AWS S3 URI, returns bucket and key.
- pynamodb_mate.helpers.join_s3_uri(bucket: str, key: str) str[source]#
Join AWS S3 URI from bucket and key.
- pynamodb_mate.helpers.remove_s3_prefix(s3_client: S3Client, bucket: str, prefix: str)[source]#
Remove all objects with the same prefix in the bucket.
- pynamodb_mate.helpers.batch_delete_s3_objects(s3_client: S3Client, s3_uri_list: List[str])[source]#
Batch delete many S3 objects. If they share the same bucket, then use the
s3_client.delete_objectsmethod. If they do not share the same bucket, then uses3_client.delete_objectmethod.- Parameters:
s3_client –
boto3.client("s3")object.s3_uri_list – example: [“s3://bucket/key1”, “s3://bucket/key2”].