Storing exported data in Amazon S3
If you want to store your exported data in Amazon S3, use the following procedure.
Configuring Kinesis manually in the console
-
Sign in to the AWS Management Console and open the Kinesis console at https://console.aws.amazon.com/kinesis.
-
Choose Delivery streams in the navigation pane.
-
Choose Create delivery stream.
-
For Source, select Amazon Kinesis Data Streams.
-
For Destination, select Amazon S3.
-
Under Source settings, Kinesis data stream, enter the ARN of your Kinesis data stream.
-
Under delivery stream name, enter the name of your Kinesis data stream.
-
Under Desination settings, choose an Amazon S3 bucket or enter a bucket URI.
-
(optional) Enable dynamic partitioning using inline parsing for JSON. This option is appropriate if you want to partition streaming measurement data based on source information and timestamp. For example:
-
Choose Enabled for Dynamic partitioning.
-
Choose Enabled for New line delimiter.
-
Choose Enabled for Inline parsing for JSON.
-
Under Dynamic partitioning keys, add:
Key name JQ expression project
.projectName| "project=\(.)"
site
.eventPayload.siteName| "site=\(.)"
time
.timestamp| sub("[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}$"; "00:00:00")| "time=\(.)"
-
-
Choose Apply dynamic partitioning keys and confirm the generated Amazon S3 bucket prefix is
!{partitionKeyFromQuery:project}/!{partitionKeyFromQuery:site}/!{partitionKeyFromQuery:time}/
. -
In Amazon S3, objects will use the following key format:
/project={projectName}/site={siteName}/time={yyyy-mm-dd 00:00:00}/{filename}
. -
Choose Create delivery stream.