This folder contains some useful shell script to interact with the Amazon Managed Service for Apache Flink API via AWS CLI.
All scripts have the following prerequisites:
All scripts assume the default profile is authenticated to the AWS account hosting the Managed Flink application with sufficient permissions, and the default region matches the region of the application. You can modify the script to pass AWS profile or region explicitly.
These scripts are for demonstration purposes only.
This script returns the status of each task in the Flink job.
This is useful for example to automate operation, to check whether an update has been successfully deployed or is stuck in a fail-and-restart loop due to some problem at runtime.
The job is up-and-running and processing data when all the tasks are RUNNING.
When the application is not RUNNING, the script always returns UNKNOWN
Example 1: the job has 3 tasks, is healthy and processing data
> ./task_status.sh MyApplication
RUNNING
RUNNING
RUNNINGExample 2: the job has 2 tasks, failing and restarting
> ./task_status.sh MyApplication
FAILED
CANCELEDExample 3: the application is not running
> ./task_status.sh MyApplication
UNKNOWN