Example #1
0
    def check_bucket_exists(self):
        from moto.s3 import s3_backend

        try:
            s3_backend.get_bucket(self.bucket_name)
        except Exception:
            raise S3BucketDoesNotExistException(
                f"S3 bucket {self.bucket_name} does not exist!")
Example #2
0
 def create_export_task(
     self,
     *,
     task_name,
     log_group_name,
     log_stream_name_prefix,
     fromTime,
     to,
     destination,
     destination_prefix,
 ):
     s3_backend.get_bucket(destination)
     if log_group_name not in self.groups:
         raise ResourceNotFoundException()
     task_id = uuid.uuid4()
     return task_id
Example #3
0
 def create_export_task(self, log_group_name, destination):
     s3_backend.get_bucket(destination)
     if log_group_name not in self.groups:
         raise ResourceNotFoundException()
     task_id = uuid.uuid4()
     return task_id