AWS CLI¶
The AWS CLI works against Record Store once it is told to use a custom endpoint and path-style addressing.
Configure a profile¶
Enter the access key and secret from a service account.
For Default region name use us-east-1 — Record Store does not use regions, but
SigV4 requires one and the signature must match.
Path-style addressing must be set per profile:
Why path-style
Virtual-hosted style puts the bucket in the hostname (demo.storage.example.com),
which needs wildcard DNS and a wildcard certificate. Record Store expects the
bucket in the path (storage.example.com/demo).
Two environment settings you will want¶
export AWS_EC2_METADATA_DISABLED=true
export AWS_REQUEST_CHECKSUM_CALCULATION=WHEN_REQUIRED
export AWS_RESPONSE_CHECKSUM_VALIDATION=WHEN_REQUIRED
The first stops the CLI pausing to look for EC2 instance metadata that is not there.
The other two keep the CLI off AWS's aws-chunked trailing-checksum encoding, which
Record Store reports as unsupported. Without them, newer AWS CLI versions can fail
uploads with a NotImplemented error.
Common operations¶
Copy¶
Server-side copy works within and across buckets:
Both COPY (inherit the source's metadata) and REPLACE (supply new metadata)
directives are supported.
Multipart¶
aws s3 cp switches to multipart automatically for large files, and aws s3api
exposes the individual operations. Both work. See
Multipart Uploads.
Presigned URLs¶
See Presigned URLs.
What does not work¶
| Command | Why |
|---|---|
aws s3api put-object-acl, get-object-acl |
ACLs are not implemented |
aws s3api put-object-lock-configuration |
Object Lock is not implemented |
aws s3api upload-part-copy |
UploadPartCopy is not implemented |
--sse, --sse-kms-key-id |
Server-side encryption headers are not implemented |
Unsupported operations return an S3 XML NotImplemented error. They are never
silently accepted. Record Store's own
encryption at rest is configured server-side and needs no
request headers.
aws s3 sync works, since it is built from ListObjectsV2, GetObject, PutObject,
and DeleteObject.
Troubleshooting¶
A SignatureDoesNotMatch error is nearly always one of four things: the wrong secret,
a proxy rewriting the request, clock skew, or missing path-style addressing. See
Authentication Errors.