An Apache Flink application that runs operations such as aggregations, joins, and windows builds up state as it processes events, and Amazon Managed Service for Apache Flink saves that state in snapshots. Until now, a snapshot belonged to the application that created it, so you could restore it only into that same application, in the same Region.

Today, we’re announcing general availability of enhanced snapshots. An enhanced snapshot is an AWS resource with its own Amazon Resource Name (ARN), decoupled from the application that created it. You can start a different application from it in the same account and Region. You can also export it to an Amazon Simple Storage Service (Amazon S3) bucket you own. In the other direction, you can import an Apache Flink savepoint from Amazon S3 as a new enhanced snapshot and start an application from it.

With enhanced snapshots, you can deploy updates to a stateful application without a long pause in processing, recover in a second Region, and move a self-managed Flink job to the managed service with its state. In this post, we walk through these three use cases. We then show how to turn on enhanced snapshots, start one application from another’s state, export and import snapshots, and set up permissions. For the full reference, see Enhanced snapshots in the Amazon Managed Service for Apache Flink Developer Guide.

Use cases

These three use cases all build on the same concept: making an application’s state reusable across applications.

Support blue/green deployments for stateful applications

Deploying new code to a stateful application normally means stopping it, restarting it from a snapshot, and waiting while the new version catches up. A blue/green deployment avoids a long outage and reprocessing all the data. You run the current version (blue) and the new version (green) side by side, and you keep blue running until you have checked green’s output. For a stateful application, the hard part is bootstrapping green from blue’s existing state, and that is what enhanced snapshots provide.

Take an enhanced snapshot of blue, then start green from that snapshot with the new code. Green begins with blue’s state and processes only the data written since the snapshot. When green has caught up, point downstream consumers at its output and stop blue. If green has a problem, blue is still running.

While both run, each application reads the source and writes its own output, and you pay for the compute of both. Green reprocesses the events written since the snapshot, so its output overlaps with blue’s. Downstream consumers must tolerate duplicates or deduplicate them when you cut over, because this pattern doesn’t give you exactly-once delivery across the switch. You can also use the same flow to A/B test a change against production state, or to clone a running application’s state to reproduce a bug without touching the live job.

Disaster recovery in a second Region

If a Region becomes unavailable, a standby application in another Region can take over with recent state. It doesn’t need to start empty and rebuild its state from the source. Export and import run in the Region where the snapshot lives. To recover in a second Region, export snapshots on a schedule to a bucket in the primary Region. Then replicate that bucket to the standby Region with Amazon S3 Cross-Region Replication. When you need to fail over, import the latest replicated snapshot in the standby Region and start the standby application from it. More frequent exports mean less data to process after failover and a faster recovery, at the cost of more export operations and more Amazon S3 storage and replication. Choose the export interval from your recovery time objective (RTO).

Moving a self-managed Flink job to a managed service means starting it with empty state and replaying history to rebuild it. With enhanced snapshots, the job moves together with its state. Take a savepoint of the job on your self-managed Flink cluster. Copy it to an S3 bucket in the account and Region where the new application will run. Import the savepoint as an enhanced snapshot, then start an Amazon Managed Service for Apache Flink application from it.

Import validates the savepoint before it restores, so the source objects must meet the documented requirements, including a full-object CRC-64/NVME (CRC64NVME) checksum. See the Developer Guide for the full list of import prerequisites.

The new application starts from the savepoint’s state and resumes reading the source from the savepoint’s offsets. It processes only the data written since the savepoint instead of replaying history. For the import to work, the savepoint must come from a supported Flink version and your job’s operator IDs (UIDs) must match the ones in the savepoint. Check the new application’s output before you shut down the self-managed job. An imported snapshot has no source application, so it does not appear when you list snapshots by application name. Track the snapshots you import by calling ListSnapshots with SnapshotInitiatorOperation set to ImportSnapshot when you need them for cleanup or inventory.

How it works

Because an enhanced snapshot is an AWS resource of its own, separate from the application that created it, it has its own IAM permissions, which the last step covers.

Turning on enhanced snapshots and restoring from them takes a handful of API calls and one new application setting. The following steps cover each one, from turning on the feature through the permissions you need. The examples use the AWS Command Line Interface (AWS CLI). If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI. If you work with a coding agent, the Agent Skill described at the end of this post gives it the same guidance.

Turn on enhanced snapshots

Enhanced snapshots work with applications on Apache Flink 1.20 and later. For a new application, set SnapshotMode to ENHANCED_SNAPSHOTS in ApplicationSnapshotConfiguration when you create it. You can switch an existing application in place while it is running, and it keeps its state:

aws kinesisanalyticsv2 update-application \ --application-name orders-enrichment \ --current-application-version-id 7 \ --application-configuration-update '{ "ApplicationSnapshotConfigurationUpdate": { "SnapshotsEnabledUpdate": true, "SnapshotModeUpdate": "ENHANCED_SNAPSHOTS" } }'

You can undo the switch with RollbackApplication, but only before you update the application again. After that, you can’t change the mode back. Once you switch, CreateApplicationSnapshot returns an error, so move any scripts that you use to periodically take snapshots of the application to CreateSnapshot first. Take an enhanced snapshot right after you switch, because that is the application’s first snapshot that another application can start from or that you can export.

Start one application from another’s state

Create a snapshot of the running application:

aws kinesisanalyticsv2 create-snapshot \ --application-name orders-enrichment \ --snapshot-name orders-enrichment-2026-11-02

Snapshot creation is asynchronous. Call describe-snapshot until SnapshotStatus is READY. The response also returns the SnapshotArn. Then start the green application, created with enhanced snapshots turned on, from that ARN:

aws kinesisanalyticsv2 start-application \ --application-name orders-enrichment-green \ --run-configuration '{ "ApplicationRestoreConfiguration": { "ApplicationRestoreType": "RESTORE_FROM_CUSTOM_SNAPSHOT", "SnapshotArn": "arn:aws:kinesisanalytics:us-east-1:123456789012:snapshot/orders-enrichment-2026-11-02" } }'

RESTORE_FROM_CUSTOM_SNAPSHOT already exists for application snapshots, which you select with SnapshotName. For an enhanced snapshot, you pass SnapshotArn instead. The new application restores the saved state only if its operator UIDs, state types, and maxParallelism are compatible with the job that wrote the snapshot. It must also run a compatible Flink version.

Enhanced snapshots stay until you delete them with DeleteSnapshot, including after you delete the application that created them.

Export and import

Export and import read from and write to your bucket through an IAM role that you pass in the request. The service assumes that role, so the Amazon S3 permissions belong on the role rather than on the caller. The role’s trust policy allows the kinesisanalytics.amazonaws.com service principal, scoped with aws:SourceAccount and aws:SourceArn. The bucket must be in the same account and Region as the snapshot. For the full trust and permissions policies for these roles, see Export and import permissions in the Developer Guide.

To export a snapshot:

aws kinesisanalyticsv2 export-snapshot \ --snapshot-name orders-enrichment-2026-11-02 \ --export-destination-configuration '{ "DestinationType": "S3", "ExportRoleArn": "arn:aws:iam::123456789012:role/MsfSnapshotExportRole", "DestinationS3PrefixLocation": { "BucketARN": "arn:aws:s3:::amzn-s3-demo-bucket", "KeyPrefix": "flink-snapshots/" }, "DestinationEncryptionConfiguration": { "KeyType": "CUSTOMER_MANAGED_KEY", "KeyId": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab" } }'

End KeyPrefix with a slash. Each export writes to a new folder under the prefix, and the service reports the exact location as ExportedPrefix when you describe the operation. When you import an exported snapshot, point KeyPrefix at that exact folder, not at the parent prefix. The import looks for the savepoint metadata there, and a prefix that does not contain it fails.

To import a savepoint copied from a self-managed cluster:

aws kinesisanalyticsv2 import-snapshot \ --snapshot-name orders-enrichment-migrated \ --import-source-configuration '{ "SourceType": "S3", "ImportRoleArn": "arn:aws:iam::123456789012:role/MsfSnapshotImportRole", "SourceS3PrefixLocation": { "BucketARN": "arn:aws:s3:::amzn-s3-demo-bucket", "KeyPrefix": "savepoints/savepoint-1a2b3c/" } }'

To import a snapshot you exported instead, set KeyPrefix to its ExportedPrefix.

Both calls are asynchronous and return a SnapshotOperationId. Track progress with describe-snapshot-operation, which also returns error details if the operation fails:

aws kinesisanalyticsv2 describe-snapshot-operation \ --snapshot-name orders-enrichment-migrated \ --snapshot-operation-id <operation-id>

Export and import use AWS Key Management Service (AWS KMS) keys for both the snapshot and the S3 objects. Specify each key as a full key ARN, because key IDs and aliases are rejected. For key policies, encryption settings, and the encryption context, see Encryption for enhanced snapshots in the Developer Guide.

Set up permissions

Enhanced snapshots are their own IAM resource type, with ARNs of the form arn:aws:kinesisanalytics:region:account-id:snapshot/snapshot-name. Two of the new actions are permission-only, with no API of the same name, so you might overlook them. With kinesisanalytics:RestoreFromSnapshot on the snapshot ARN, a caller can start, update, or roll back an application from a snapshot, including a snapshot the same application created. kinesisanalytics:CreateSystemSnapshot on the application ARN covers the automatic snapshots the service takes when you stop, update, or start an application that has snapshots turned on. Keep it in the policy even if you never stop the application, because the start path checks it too.

With the following policy, a caller can run one application, snapshot it, and start from its snapshots:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "ManageApplication", "Effect": "Allow", "Action": [ "kinesisanalytics:StartApplication", "kinesisanalytics:UpdateApplication", "kinesisanalytics:StopApplication", "kinesisanalytics:CreateSnapshot", "kinesisanalytics:CreateSystemSnapshot" ], "Resource": "arn:aws:kinesisanalytics:us-east-1:123456789012:application/orders-enrichment" }, { "Sid": "ReadAndRestoreSnapshots", "Effect": "Allow", "Action": [ "kinesisanalytics:DescribeSnapshot", "kinesisanalytics:DescribeSnapshotOperation", "kinesisanalytics:ListSnapshotOperations", "kinesisanalytics:RestoreFromSnapshot" ], "Resource": [ "arn:aws:kinesisanalytics:us-east-1:123456789012:snapshot/orders-enrichment-*", "arn:aws:kinesisanalytics:us-east-1:123456789012:snapshot/SYSTEMSNAPSHOT-*-orders-enrichment-*" ] }, { "Sid": "ListSnapshots", "Effect": "Allow", "Action": "kinesisanalytics:ListSnapshots", "Resource": "*" }, { "Sid": "CustomerManagedKey", "Effect": "Allow", "Action": [ "kms:DescribeKey", "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab" } ] }

The orders-enrichment-* pattern matches the snapshots you create, assuming you start their names with the application name. The SYSTEMSNAPSHOT-*–orders-enrichment-* pattern matches the system snapshots the service takes for this application. This policy scopes to a single application. A blue/green or migration setup that starts a second application needs the same StartApplication and CreateSystemSnapshot grants on that application’s ARN too. System snapshots inherit the application’s tags, and you can scope access by tags with aws:ResourceTag conditions on the snapshot actions. ListSnapshots lists across the account, so its resource is *. Leave out the KMS statement if the application uses an AWS owned key. For export and import, the caller also needs kinesisanalytics:ExportSnapshot or kinesisanalytics:ImportSnapshot on the snapshot ARN, and iam:PassRole for the role, scoped with iam:PassedToService set to kinesisanalytics.amazonaws.com.

Now available

Enhanced snapshots are available today in all AWS Regions where Amazon Managed Service for Apache Flink is available, for applications on Apache Flink 1.20 and later. For the number of export and import operations you can run at a time, see Quotas in the Developer Guide.

Enhanced snapshot storage is priced the same as application snapshots, and there is no additional charge for export or import. Amazon S3 charges for storage, requests, and replication in your own buckets. Enhanced snapshots and the system snapshots the service takes on stop, update, and start are kept until you delete them. They keep accruing storage charges after the application that created them is gone, so delete snapshots you no longer need. To learn more, visit the Amazon Managed Service for Apache Flink pricing page.

To get started, see Enhanced snapshots in the Amazon Managed Service for Apache Flink Developer Guide.

If you use a coding agent, install the developing-applications-on-managed-service-for-apache-flink Agent Skill with the AWS CLI. For setup details, see the Agent Toolkit for AWS Skill Installation Guide. For example:

aws configure agent-toolkit aws agent-toolkit add-skill --skill-name developing-applications-on-managed-service-for-apache-flink

We also recommend that you install the AWS MCP Server in your developer tool of choice. It gives coding agents tools to search AWS documentation, blog posts, and Agent Skills at runtime. They can then work from current AWS guidance and find and install skills more easily. To install it, see Setting up the AWS MCP Server.

 


About the authors

Francisco Morillo

Francisco Morillo

Francisco is a Sr. Streaming Solutions Architect at AWS, specializing in real-time analytics architectures. With over five years in the streaming data space, Francisco has worked as a data analyst for startups and as a big data engineer for consultancies, building streaming data pipelines. He has deep expertise in Amazon Managed Streaming for Apache Kafka (Amazon MSK) and Amazon Managed Service for Apache Flink.

Mayank Juneja

Mayank Juneja

Mayank is a Senior Product Manager at AWS, leading Amazon Managed Service for Apache Flink. He lives at the intersection of real-time data streaming and AI, previously driving Flink SQL and AI inference products at Confluent. A recognized voice in the streaming community, Mayank has taken the stage at industry conferences including Kafka Summit, Current, and Flink Forward.