Skeleton project for a basic Flink Java application to run on Amazon Managed Service for Apache Flink.
- Flink version: 1.20
- Flink API: DataStream API
- Language: Java (11)
- Flink connectors: Kinesis Consumer, Kinesis Sink
The project can run both on Amazon Managed Service for Apache Flink, and locally for development.
The application shows how to get runtime configuration, and set up a Kinesis Data Stream source and a sink.
When running on Amazon Managed Service for Apache Flink the runtime configuration is read from Runtime Properties.
When running locally, the configuration is read from the resources/flink-application-properties-dev.json file located in the resources folder.
Runtime parameters:
| Group ID | Key | Description |
|---|---|---|
InputStream0 |
stream.name |
Name of the input stream |
InputStream0 |
aws.region |
(optional) Region of the input stream. If not specified, it will use the application region or the default region of the AWS profile, when running locally. |
OutputStream0 |
stream.name |
Name of the output stream |
OutputStream0 |
aws.region |
(optional) Region of the output stream. If not specified, it will use the application region or the default region of the AWS profile, when running locally. |
All parameters are case-sensitive.
You can run this example directly in IntelliJ, without any local Flink cluster or local Flink installation.
See Running examples locally for details.
You can use Kinesis Data Generator, also available in a hosted version, to generate random data to Kinesis Data Stream and test the application.