Amazon Managed Service for Apache Flink
You can use Apache Flink to transfer your time series data from Amazon Managed Service for Apache Flink, Amazon MSK, Apache
Kafka, and other streaming technologies directly into Amazon Timestream for LiveAnalytics. We've created an Apache Flink
sample data connector for Timestream. We've also created a sample application for sending data to
Amazon Kinesis so that the data can flow from Kinesis to Managed Service for Apache Flink, and finally on to Amazon Timestream. All
of these artifacts are available to you in GitHub. This video tutorial
Note
Java 11 is the recommended version for using the Managed Service for Apache Flink Application. If you have multiple Java versions, ensure that you export Java 11 to your JAVA_HOME environment variable.
Sample application
To get started, follow the procedure below:
-
Create a database in Timestream with the name
kdaflink
following the instructions described in Create a database -
Create a table in Timestream with the name
kinesisdata1
following the instructions described in Create a table -
Create an Amazon Kinesis Data Stream with the name
TimestreamTestStream
following the instructions described in Creating a Stream -
Clone the GitHub repository for the Apache Flink data connector for Timestream
following the instructions from GitHub -
To compile, run and use the sample application, follow the instructions in the Apache Flink sample data connector README
-
Compile the Managed Service for Apache Flink application following the instructions for Compiling the Application Code
-
Upload the Managed Service for Apache Flink application binary following the instructions to Upload the Apache Flink Streaming Code
-
After clicking on Create Application, click on the link of the IAM Role for the application
-
Attach the IAM policies for AmazonKinesisReadOnlyAccess and AmazonTimestreamFullAccess.
Note
The above IAM policies are not restricted to specific resources and are unsuitable for production use. For a production system, consider using policies that restrict access to specific resources.
-
-
Clone the GitHub repository for the sample application writing data to Kinesis
following the instructions from GitHub -
Follow the instructions in the README
to run the sample application for writing data to Kinesis -
Run one or more queries in Timestream to ensure that data is being sent from Kinesis to Managed Service for Apache Flink to Timestream following the instructions to Create a table
Video tutorial
This video