Python records are serialized as JSON and stored in S3.
Downstream Glue and Athena jobs need a region-independent UTC ISO 8601 timestamp.
Which implementation is most appropriate?
Convert a timezone-aware datetime to UTC and serialize it in ISO 8601 rather than storing a naive local time.
Detailed explanation
The region and daylight-saving context are lost, so the absolute time cannot be recovered reliably.
The region and daylight-saving context are lost, so the absolute time cannot be recovered reliably.
CloudTrail time describes an AWS API audit event, not a business event.
CloudTrail time describes an AWS API audit event, not a business event.
Object modification time is not guaranteed to equal the event's occurrence time.
Object modification time is not guaranteed to equal the event's occurrence time.
The stored value represents an absolute time and can be interpreted consistently by downstream systems.
The stored value represents an absolute time and can be interpreted consistently by downstream systems.
Check official documentation
Compare the following points with the official documentation.
Python datetime timezone・isoformat、Athena timestampの公式説明を確認する。
What to confirm
naive datetime・S3メタデータ・CloudTrail時刻の違いを説明できる。
Key points
- Python datetime
- UTC
- ISO 8601
- Serialization
Notes
- Environment: AWS公式DEA-C01試験ガイドと各サービスの公式ドキュメントの確認
- Confirm current AWS service behavior in the official DEA-C01 documentation.
Foundation review
Canonical storage
Normalize to UTC for storage and convert to a user's zone only for display.
Event versus file time
Object metadata and audit timestamps describe infrastructure events, not necessarily business events.