PluginBench
Skill
Official
Pass
Audit score 90

developing-applications-on-managed-service-for-apache-flink

aws/agent-toolkit-for-aws

Domain expertise for Apache Flink and Amazon Managed Service for Apache Flink development, deployment, and operations.

What is developing-applications-on-managed-service-for-apache-flink?

This skill provides specialized knowledge for building and operating Apache Flink applications on Amazon Managed Service for Apache Flink (MSF). It covers MSF-specific constraints, KPU resource management, connectors, state management, monitoring, IaC deployment, and version migration—overriding generic Flink knowledge with service-specific details.

  • Guides Flink application development using DataStream and Table APIs with MSF best practices
  • Manages KPU sizing, resource optimization, and scaling decisions for running applications
  • Configures and troubleshoots Kinesis, Kafka, and Iceberg connectors with MSF-specific patterns
  • Handles checkpoint tuning, state management, and job graph architecture for performance
  • Deploys applications via IaC with proper IAM policies, trust principals, and two-phase deployment patterns
  • Diagnoses restart loops, monitoring issues, and provides Flink 1.x to 2.x migration guidance

How to install developing-applications-on-managed-service-for-apache-flink

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill developing-applications-on-managed-service-for-apache-flink
Prerequisites
  • AWS account with Managed Service for Apache Flink enabled
  • Java development environment (Maven or Gradle)
  • Familiarity with Apache Flink concepts (DataStream API, operators, state)
  • AWS CLI configured with appropriate credentials
Claude Code
Cursor
Windsurf
Cline

How to use developing-applications-on-managed-service-for-apache-flink

  1. 1.Activate this skill when any Flink, MSF, KinesisAnalytics, KPU, checkpoint, or connector-related question arises
  2. 2.Load the relevant reference file from the skill based on your task (e.g., best-practices.md for new applications, checkpoint-tuning.md for performance issues)
  3. 3.Follow the example workflows: confirm user goals, read guidance, generate or validate code, then test locally or deploy
  4. 4.Use AWS MCP server tools when available for sandboxed command execution; fall back to AWS CLI if needed
  5. 5.Consult foundation-operations.md for IAM policy and trust principal details—note the kinesisanalytics: prefix (no v2) and kinesisanalytics.amazonaws.com service principal

Use cases

Good for
  • Building real-time streaming applications that ingest from Kinesis or Kafka and write to Iceberg data lakes
  • Right-sizing KPU capacity and optimizing costs for production Flink workloads on MSF
  • Troubleshooting checkpoint failures, memory issues, and performance bottlenecks in running applications
  • Migrating self-managed Flink applications to Amazon Managed Service for Apache Flink
  • Configuring Enhanced Fan-Out (EFO) consumers and tuning Kinesis polling for high-throughput scenarios
Who it's for
  • Data engineers building streaming pipelines on AWS
  • DevOps engineers deploying and operating Flink applications at scale
  • Solutions architects designing real-time analytics platforms
  • Developers migrating from self-managed Flink to MSF

developing-applications-on-managed-service-for-apache-flink FAQ

When should I activate this skill?

Activate immediately on any mention of Flink, MSF, Managed Flink, KinesisAnalytics, KPU, checkpoint, savepoint, operator UID, or connectors like Kinesis, Kafka, or Iceberg. Do not answer from training knowledge—load the relevant reference files first.

What is the key difference between kinesisanalytics and kinesisanalyticsv2?

kinesisanalyticsv2 is used only in CLI and SDK calls; kinesisanalytics (without v2) is used for IAM action prefixes, service principals in trust policies, CloudWatch namespaces, and Service Quotas. This v1/v2 split is the most common source of permission and AssumeRole failures.

How do I size KPUs correctly for my application?

Load resource-optimization.md to understand KPU memory, CPU, and parallelism relationships. Use pricing-calculator.md to map sizing decisions to cost. Consider checkpoint frequency, state size, and throughput requirements when right-sizing.

What are the most common MSF-specific constraints I should know?

MSF prohibits checkpoint and parallelism configuration in application code (these are set at the service level), uses a KPU billing model, requires two-phase IaC deployments, and has specific snapshot lifecycle and network/storage limits documented in msf-constraints-and-patterns.md.

How do I troubleshoot a Flink application that keeps restarting?

Load first-fault-isolation.md to distinguish the original failure from loop sustainers. Use the Flink Dashboard for live diagnosis, check CloudWatch Logs, and review checkpoint and state configuration. Common causes include OOM during checkpoints, unhandled exceptions, and resource exhaustion.

Full instructions (SKILL.md)

Source of truth, from aws/agent-toolkit-for-aws.


name: developing-applications-on-managed-service-for-apache-flink description: >- MANDATORY for Flink or Amazon Managed Service for Apache Flink (MSF) questions. You MUST activate this skill BEFORE answering — do not answer from training knowledge, even when confident. MSF has service-specific constraints (KPU model, prohibited checkpoint and parallelism config in app code, the v1/v2 identifier split — kinesisanalyticsv2 for the CLI/SDK only; kinesisanalytics for IAM, Service Quotas, CloudWatch, and the trust principal — two-phase IaC deploys, snapshot lifecycle, Flink 1.x→2.x migration) that override generic Flink knowledge.

Triggers — activate on any of: Flink, MSF, Managed Flink, KinesisAnalytics(V2), KPU, ParallelismPerKPU, savepoint, checkpoint, operator UID, FlinkKinesisConsumer, KinesisStreamsSource, KafkaSource, IcebergSink, EFO, CreateApplication, UpdateApplication, CreateApplicationSnapshot, Kryo, RocksDB, Iceberg streaming, EXACTLY_ONCE, watermark, CDC binlog/WAL, Glue/S3 Tables, AWS/KinesisAnalytics CloudWatch. version: 2

Managed Service for Apache Flink

Overview

Domain expertise for Apache Flink applications on Amazon Managed Service for Apache Flink (MSF). Covers development, KPU resource management, connectors, state management, monitoring, IaC deployment, and version migration.

Execute commands using available tools from the AWS MCP server when connected — it provides sandboxed execution, audit logging, and observability. When the MCP server is not available, fall back to the AWS CLI or shell as needed.

General Guidance

Before starting, ensure you have a clear understanding of the user persona, use case, and requirements:

STOP: Determine the users background and use case before proceeding:

  • Are they new to Flink? New to Managed Service for Apache Flink?
  • Are they familiar with Java development?
  • Is the use case complex with lots of business logic? Or simple and declarative?

These will inform how to organize the project, and whether to use Flink Table API or DataStream API. In general, assume the DataStream API.

Example Workflow for New Applications

1. User asks to build a Flink application
2. Confirm user's goals and use case
3. READ [best-practices.md](references/best-practices.md)
4. READ [dependency-management.md](references/dependency-management.md)
5. READ relevant connector guides (e.g. [kinesis-connector-guide.md](references/kinesis-connector-guide.md))
6. Generate code following the loaded guidance
7. Validate against best practices
8. READ environment-setup.md via [environment-setup.md](references/environment-setup.md)
9. Compile and test locally

Example Workflow for General Questions

1. User asks about real time delivery of data to Iceberg
2. Confirm user's goals and use case
3. READ [best-practices.md](references/best-practices.md)
4. READ [iceberg-connector-guide.md](references/iceberg-connector-guide.md)
5. READ other reference files as needed
6. Answer question with loaded guidance

Reference Files

  • You MUST use this skill and its reference files to answer any question on these topics.
  • Do NOT answer from training knowledge or by searching general AWS documentation when the question concerns Apache Flink, Managed Service for Apache Flink, KPU sizing, Flink monitoring, deployment, migration, real-time analytics, or Iceberg/LakeHouse streaming with Flink
    • You MUST load the relevant reference files below before taking other steps.
    • The reference files contain MSF-specific details (thresholds, statistics, namespaces, constraints) that differ from generic Flink guidance and are required for correct responses.
GoalReferenceWhen to Load
Best practicesbest-practices.mdAlways before writing code
Maven dependenciesdependency-management.mdNew project or adding connectors
Local dev environmentenvironment-setup.mdDocker-based local development
MSF architecturemsf-overview.mdKPU model and service constraints
MSF constraints and patternsmsf-constraints-and-patterns.mdMSF vs self-managed Flink, service-level vs application-level configuration separation, MSF-specific resource/network/storage limits, common MSF patterns
Quotas, ENI planning, MSF vs EMR, source/sink choicefoundation-operations.mdCapacity planning, service selection, architecture design, CLI/IAM/CloudWatch identifier disambiguation
IAM execution role, trust policy, action prefix, service principalfoundation-operations.mdWriting IAM policies for MSF — covers the kinesisanalytics: (no v2) action prefix, kinesisanalytics.amazonaws.com (no v2) trust principal, and the v2/non-v2 disconnect that is the most common source of permission and AssumeRole failures
Flink 2.x migrationflink-2x-migration.mdVersion upgrades, state compatibility
KPU sizingresource-optimization.mdRight-sizing, performance diagnosis, scaling
Scaling decisions on running appsscaling-decisions.mdIn-flight scaling matrix, cost/memory impact of scale changes, autoscaling behavior, anti-patterns
Cost estimationpricing-calculator.mdBudget planning, sizing-to-cost mapping, optimization levers
Application lifecycle opsapplication-lifecycle.mdStart/stop, deploy code, rollback, snapshot lifecycle, runtime properties, delete
Restart loop diagnosisfirst-fault-isolation.mdCrashing/restarting apps, finding original failure vs loop sustainers, Flink Dashboard live diagnosis
Checkpoint tuningcheckpoint-tuning.mdCheckpoint impact on KPU memory and CPU, frequency vs network bandwidth trade-offs, checkpoint duration exceeding interval, OOM/GC during checkpoints
Job graph designjob-graph-architecture.mdPerformance issues, splitting jobs
Job graph anti-patternsjob-graph-anti-patterns.mdData skew detection and mitigation, monolith job anti-pattern, high fan-out anti-pattern, removing multiple shuffles, when to split a large application
Monitoring and alarmsmonitoring-and-metrics.mdCloudWatch dashboards, alarms, metrics
Logginglogging-configuration.mdLog4j2, CloudWatch Logs setup
Kinesis connectorskinesis-connector-guide.mdKinesis source and sink builders, polling configuration and throttling (READER_EMPTY_RECORDS_FETCH_INTERVAL, SHARD_GET_RECORDS_MAX, ReadProvisionedThroughputExceeded, LimitExceededException), legacy connector migration
Kinesis Enhanced Fan-Out (EFO)kinesis-efo-guide.mdWhen to use EFO vs polling, EFO source configuration, consumer lifecycle (JOB_MANAGED vs SELF_MANAGED), parallelism vs shard count, IAM permissions, troubleshooting
Iceberg integration (write APIs, distribution modes, partitioning)iceberg-connector-guide.mdIceberg write APIs (append, upsert, dynamic), distribution modes (NONE/HASH/RANGE), CoW vs MoR, read patterns, partitioning, DDL. Does NOT contain catalog choice or maintenance approaches — for those, load iceberg-tuning-and-operations.md.
Iceberg tuning, operations, catalog choice, maintenanceiceberg-tuning-and-operations.mdProvides maintenance approaches for S3 Tables, Glue + Glue auto-compaction, and Glue + Flink embedded maintenance with JDBC lock for catalog-choice questions; small files problem and mitigations; Flink TableMaintenance API, post-commit maintenance, lock factories; IcebergSink monitoring, anti-patterns.
CDC connectorscdc-connector-guide.mdMySQL, PostgreSQL, Oracle, SQL Server, MongoDB CDC
IaC and deploymentiac-and-deployment.mdCloudFormation, CDK, Terraform, two-phase deployment
Serializationserialization-guide.mdPOJO, Avro, Kryo guidance
State managementstate-management.mdTTL, state types, migration safety

Additional Resources