Set it for the process
endpoint_url:
Set it on one client
Session or dependency-injected client for Cloud Adapter. Avoid changing a process-wide endpoint behind unrelated AWS clients.
An explicit endpoint_url takes precedence over AWS_ENDPOINT_URL_S3.
Verify object behavior
put_object. If the application depends on metadata, ETags, version IDs, ranges, conditionals, or multipart uploads, assert those behaviors separately against the S3 target profile.
Distinguish service and transport failures
ClientError means an HTTP service response reached Botocore. A connection or read timeout may have no response metadata at all. After a timed-out write, check target state before deciding whether to retry.
Production checklist
- Pin boto3 and Botocore versions together.
- Keep the endpoint, region, retry policy, and credentials explicit.
- Reuse clients across requests.
- Do not log
Authorization, signed URLs, secret values, or object bodies. - Capture
ResponseMetadataand Cloud Adapter diagnostic headers. - Add integration tests for paginators, waiters, retries, and error codes used by the application.