Aws s3 table bucket:
- it is build to store table kind of data
- it will be suppourt namespace option (database)
- we can create multiple tables in every namespace
keypoints:
- org: table bucket ==> namespace ==> tables
- data format will be cloumn, transation
- automatically managed by aws / snapshort
- you can’t put-object , insert/wirte data with query
create table bucket
aws s3tables create-table-bucket --name qt-devops-s3-table
## output
{
"arn": "arn:aws:s3tables:us-east-1:998850986822:bucket/qt-devops-s3-table"
}
aws s3tables create-namespace --table-bucket-arn arn:aws:s3tables:us-east-1:998850986822:bucket/qt-devops-s3-table --namespace dataproduct
## output
{
"tableBucketARN": "arn:aws:s3tables:us-east-1:998850986822:bucket/qt-devops-s3-table",
"namespace": [
"dataproduct"
]
}
aws s3tables create-table --table-bucket-arn arn:aws:s3tables:us-east-1:998850986822:bucket/qt-devops-s3-table --namespace dataproduct --name sample --format ICEBERG
## output
{
"tableARN": "arn:aws:s3tables:us-east-1:998850986822:bucket/qt-devops-s3-table/table/667a5c2c-b7bd-4383-9260-aa5058a81c55",
"versionToken": "d3900fb40cf45bcd7c35"
}
run sample commands in anthena query
aws s3api put data and get data from vector bucket i need step by step
# create file vector.json and inset below data
{
"id": "doc1",
"embedding": [0.123, -0.456, 0.789]
}
put object by runing below cmd
aws s3api put-object --bucket my-vector-bucket --key data/vector.json --body vector.json
-
Replace my-vector-bucket with your bucket name
-
–key defines the object path inside the bucket
-
–body points to your local file
Verify Upload
- List objects in the bucket to confirm your file was uploaded.
aws s3api list-objects --bucket my-vector-bucket --prefix data/
- Check that vector.json appears in the output
- Use –prefix to filter by folder
Get Data from S3 (Download Step)
Retrieve the uploaded vector file from S3 using get-object.
aws s3api get-object --bucket my-vector-bucket --key data/vector.json output.json
- Replace output.json with your desired local filename
- The file will be downloaded and saved locally
- Use /dev/stdout if you want to print contents directly
