Simple Storage Service (S3)
Nuclear-bomb-proof data storage...?
Warning: This section is under construction
https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html
BUCKET=<my-bucket>
aws s3 ls s3://${BUCKET} --recursive
Given I have a bucket like:
{{BUILD_ID}}
is a dynamic value
aws s3api get-object --bucket=$BUCKET --key=/BUILD_ID/BUILD_ID --range bytes=0-10000 /dev/stdout | head
aws s3api get-object --bucket=$BUCKET --key=/BUILD_ID/BUILD_ID --range bytes=0-10000 | cat | head -100
aws s3api list-objects-v2 --bucket=$BUCKET --prefix=/BUILD_ID/BUILD_ID | yq -P
Last modified exists for non-versioned objects, but only goes as far back as the last modification
BUILD_ID=GfavrFILpL-QVpbstQWJs
aws s3api get-object --bucket=$BUCKET --key=static-pages/$BUILD_ID/wiki/github/api/overview.html --range bytes=0-10000 /dev/stdout
aws s3api list-object-versions \
--bucket=$BUCKET \
--prefix=static-pages/$BUILD_ID/wiki/github/api/overview.html \
--output yaml
Versions:
- ETag: '"607348acc0b363e2e6798ac85361a123"'
IsLatest: true
Key: static-pages/GfavrFILpL-QVpbstQWJs/wiki/github/api/overview.html
LastModified: "2022-07-30T21:39:55+00:00"
Owner:
DisplayName: kwangsan
ID: 05de1537e54ec7d43004182dad0ff16474d1a207a63a2f9d00a46233e16ae410
Size: 51047
StorageClass: STANDARD
VersionId: 45F5lsrQTjtzzwc6dClAzCTZV5_ZgO3t
- ETag: '"8aa571bb4b084ac1c3f4de8e97467c3b"'
IsLatest: false
Key: static-pages/GfavrFILpL-QVpbstQWJs/wiki/github/api/overview.html
LastModified: "2022-07-29T15:20:32+00:00"
Owner:
DisplayName: kwangsan
ID: 05de1537e54ec7d43004182dad0ff16474d1a207a63a2f9d00a46233e16ae410
Size: 51047
StorageClass: STANDARD
VersionId: "null"