[Backend] Send instance-level audit events to S3 destination

Description

Send instance level audit events for instances that have configured audit_events_instance_amazon_s3_configurations.

Proposal

  1. Create streamable strategy similar to InstanceExternalDestinationStrategy.
  2. POC code for sending an event to S3.
# Do not use this in production, only for reference
audit_event = JSON.parse(json_event)
credentials = Aws::Credentials.new('<access_key_id>', '<secret_access_key>')
s3 = Aws::S3::Client.new(region: '<region>', credentials: credentials)
key = "#{audit_event['entity_type']}/#{audit_event['id']}-#{Time.now.to_f}.json"
s3.put_object(body: audit_event.to_json, bucket: 'audit-logs-gitlab', key: key)
Edited by Huzaifa Iftikhar