  def Snapshot(self, tags: Optional[Dict[str, str]] = None) -> 'AWSSnapshot':
    """Create a snapshot of the volume.

    Args:
      tags (Dict[str, str]): Optional. A dictionary of tags to add to the
          snapshot, for example {'Name': 'my-snapshot-name', 'TicketID': 'xxx'}.

    Returns:
      AWSSnapshot: A snapshot object.

    Raises:
      InvalidNameError: If the snapshot name does not comply with the RegEx.
      ResourceCreationError: If the snapshot could not be created.
    """

    if not tags:
      tags = {}

    snapshot_name = tags.get('Name') or (self.volume_id + '-snapshot')
    truncate_at = 255 - 1
    snapshot_name = snapshot_name[:truncate_at]
    if len(snapshot_name) > 255:
      raise errors.InvalidNameError(
          'Snapshot name {0:s} is too long (>255 chars)'.format(snapshot_name),
          __name__)
    tags['Name'] = snapshot_name

    client = self.aws_account.ClientApi(common.EC2_SERVICE)
    try:
      snapshot = client.create_snapshot(
          VolumeId=self.volume_id,
          TagSpecifications=[common.CreateTags(common.SNAPSHOT, tags)])

      snapshot_id = snapshot.get('SnapshotId')
      # Wait for snapshot completion
      client.get_waiter('snapshot_completed').wait(
          SnapshotIds=[snapshot_id],
          WaiterConfig={'Delay': 30, 'MaxAttempts': 100})
    except (client.exceptions.ClientError,
            botocore.exceptions.WaiterError) as exception:
      raise errors.ResourceCreationError(
          'Could not create snapshot for volume {0:s}: {1:s}'.format(
              self.volume_id, str(exception)), __name__) from exception

    return AWSSnapshot(snapshot_id,
                       self.aws_account,
                       self.aws_account.default_region,
                       self.aws_account.default_availability_zone,
                       self,
                       name=snapshot_name)
Create a snapshot of the volume.

Args:
tags (Dict[str, str]): Optional. A dictionary of tags to add to the
snapshot, for example {'Name': 'my-snapshot-name', 'TicketID': 'xxx'}.

Returns:
AWSSnapshot: A snapshot object.

Raises:
InvalidNameError: If the snapshot name does not comply with the RegEx.
ResourceCreationError: If the snapshot could not be created.
libcloudforensics/providers/aws/internal/ebs.py