I'm trying to export QLDB data through AWS CLI by following that documentation:
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/qldb/export-journal-to-s3.html
- https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html
Command executed:
aws qldb export-journal-to-s3 --name my-ledger --inclusive-start-time 2022-11-06T00:00:00Z --exclusive-end-time 2022-11-07T23:59:59Z --role-arn arn:aws:iam::11111111:role/service-role/AmazonQLDB-ServiceRole-11111111--s3-export-configuration s3://testBucket
Getting the following error: Error parsing parameter '--s3-export-configuration': Expected: '=', received: 'EOF' for input: s3://testBucket
I want to understand the bucket format accepted by the command.
CodePudding user response:
Did you look at the example from the link you mentioned.
You can create a json file my-s3-export-config.json
with this content:
{
"Bucket": "awsExampleBucket",
"Prefix": "ledgerexport1/",
"EncryptionConfiguration": {
"ObjectEncryptionType": "SSE_S3"
}
}
And use that file as an input of your cli:
aws qldb export-journal-to-s3 \
--name myExampleLedger \
--inclusive-start-time 2019-09-18T00:00:00Z \
--exclusive-end-time 2019-09-18T22:59:59Z \
--role-arn arn:aws:iam::123456789012:role/my-s3-export-role \
--s3-export-configuration file://my-s3-export-config.json