Use the provided sample data to upload sample json data to your S3 bucket. You can add samples via the Samples folder. Set live=true to enable the upload interaction from the Translator.
-- Set the absolute file path in S3 bucket for the file we'll upload
local filepath = '/JSON/sample-file.json'
-- Upload sample data to bucket as sample-file.json
local Status = S:upload{
data=jsonData,
canonicalendpoint=CanonicalEndpoint,
content_type='application/json',
live=false
}
Read the data that was uploaded to the bucket:
-- Read uploaded sample-file.json from S3 bucket
local Status, file = S:readFile{canonical_endpoint=filepath,live=true}
List the objects in the bucket:
-- List files at a specified S3 bucket path
local Status, list = S:list{canonical_endpoint='JSON/',live=true}
Resulting list response is XML data: