Skip to main content
Use the normal AWS commands and response types, but construct the client with the Cloud Adapter endpoint. The example below uses AWS SDK for JavaScript v3 and S3.

Choose how to set the endpoint

Set it for the process

AWS SDK for JavaScript v3 reads that service-specific setting when the client has no explicit endpoint:

Set it on one client

Keep this endpoint decision in dependency injection or a client factory. Do not make every call site know whether it is talking to AWS or Cloud Adapter. The explicit endpoint wins when AWS_ENDPOINT_URL_S3 is also set. Avoid setting both to different values. For SDK v2, use the v2 client’s endpoint and s3ForcePathStyle settings. Avoid silently selecting different endpoint behavior during a v2-to-v3 migration.

Exercise create, read, compare, and delete

After the write, inspect the native target object. Confirm the target name, content type, metadata, and bytes.

Log useful failures safely

AWS SDK v3 service exceptions include $metadata:
Do not log the complete request object, authorization headers, signed URLs, or response bodies. For a timeout after a mutation, inspect the target before retrying.

Test what your application actually uses

The basic lifecycle does not certify paginators, multipart upload, conditional headers, presigned URLs, tags, version IDs, or retries. Add each feature to an integration test and compare it with the target-specific behavior on the S3 service page. Use Testing Your Adapters for repeatable tests and Debugging Your Adapters for translated errors.