event.handler.s3¶
AWS S3 event handler.
Module Contents¶
Classes¶
Event handler that relies on AWS S3. |
- class event.handler.s3.S3Handler(event_s3_url: str, log_s3_url: str, sse: str = 'AES256', profile: str | None = None)¶
Bases:
e3.event.EventHandlerEvent handler that relies on AWS S3.
- classmethod decode_config(config_str: str) dict[str, str | None]¶
Decode configuration string.
- Parameters:
config_str – configuration string
- encode_config() str¶
Encode configuration to string representation.
- s3_prefix(event: e3.event.Event) str¶
Additional prefix that depends on the event itself.
This hook allows a user to add a prefix that depends on the event itself. Note that sufixes are still automatically computed so distinct events can return the same prefix. The final s3 url used will be {log_s3_url}/{s3_prefix}{automatic suffix} for logs and {event_s3_url}/{s3_prefix}{automatic suffix} for events metadata.
- Parameters:
event – an event
- Returns:
the prefix
- send_event(event: e3.event.Event) bool¶
Send event to S3.
- Parameters:
event – event to send