get_attachment_history and delete_attachment_by_id are referencing rest/experimental/content, which is not valid on Confluence cloud API.
The same workaround should be applied as what is found in get_content_history_by_version_number and remove_content_history:
if self.cloud:
<rest/api/content>
else:
<rest/experimental/content>