View a markdown version of this page

Troubleshooting integrations with Amazon S3 Tables - Amazon Aurora

Troubleshooting integrations with Amazon S3 Tables

Important

This is preview documentation for the Aurora PostgreSQL integration with Amazon S3 Tables. Before using this capability, review the Betas and Previews terms in the AWS Service Terms.

Use the following information to diagnose and resolve common problems with an Aurora PostgreSQL integration with Amazon S3 Tables. Start by checking the integration status and the per-table status to find where the problem is. For more information, see Integration statuses and Per-table status.

I cannot create an integration with Amazon S3 Tables

If you cannot create an integration with Amazon S3 Tables, check for the following causes.

Enhanced logical replication is not turned on: Confirm that rds.logical_replication and aurora.enhanced_logical_replication both read on at runtime, and that aurora.logical_replication_backup and aurora.logical_replication_globaldb are set to 0 in the DB cluster parameter group. You must set these parameters in a custom DB cluster parameter group. They take effect only after you reboot the primary DB instance. Reboot the primary DB instance, and then check the values again before you create the integration. For more information, see Step 1: Create a custom DB cluster parameter group.

The table bucket resource policy is missing or incorrect: If the table bucket has no resource policy, or the policy does not grant access to the Amazon RDS service principal export.rds.amazonaws.com, create-integration fails. It returns an InvalidParameterCombination error with the following message:

"Unable to access target table bucket. Verify that the bucket exists and that its resource policy grants access to the RDS service principal."

When you create the integration, the integration checks only that it can read the bucket. A policy that is missing other required actions can still pass this check, and replication fails later. The affected tables then enter the FAILED state with the reason TARGET_ACCESS_DENIED, and Aurora sends RDS-EVENT-0589. Confirm that the policy grants every action in Creating the table bucket and resource policy.

The engine version is not supported: Confirm that the source DB cluster runs a supported Aurora PostgreSQL engine version. For supported versions, see Aurora PostgreSQL zero-ETL integrations.

The AWS KMS key is not accessible: If the key policy of the integration's AWS Key Management Service (AWS KMS) key denies your use of the key through Amazon RDS, create-integration fails with KMSKeyNotAccessibleFault. The error message includes the key's Amazon Resource Name (ARN). For the key policy, see Customer managed key for the integration.

If the source DB cluster is encrypted with a customer managed key, create-integration also checks that you can use that key. For its key policy, see Customer managed key for the source DB cluster.

My integration is not reaching the active status

Confirm that you set up the source DB cluster and the target table bucket. For instructions, see Getting started with Aurora zero-ETL integrations and Step 3c: Create a target Amazon S3 Tables table bucket.

If you created several integrations from the same source DB cluster at the same time, each one can take longer to reach active. For other factors that affect how long an integration takes to reach active, see Integration statuses.

My integration has a status of needs_attention

An integration has a status of needs_attention when it cannot continue until you fix a problem in your account. For the causes, see Integration statuses.

To recover an integration that has a status of needs_attention
  1. Find the cause. Check the events for the integration, such as RDS-EVENT-0589 for lost access to the target table bucket, or RDS-EVENT-0588 for a problem with a AWS KMS key. For more information, see Events.

  2. Check the per-table status to find the affected tables. For more information, see Per-table status.

  3. Fix the cause. For example, restore access to the target table bucket or to the AWS KMS key named in the event.

  4. Resync the integration. For instructions, see Resyncing integrations with Amazon S3 Tables.

My integration has a status of failed

An integration has a status of failed when it encounters an error that it cannot recover from. For the causes, see Integration statuses. You cannot resync an integration in this status. Instead, delete the integration and create a new one.

For instructions, see Deleting integrations with Amazon S3 Tables and Recreating an integration.

A table is not being replicated

Check the per-table status. A table that cannot be replicated has a per-table state of FAILED and a status_reason value that explains why. (The per-table state FAILED is different from the integration status failed.) For each status_reason value and what to do about it, see Per-table status.

The following are common causes:

  • The source table has no primary key: Each replicated table needs a valid primary key. For the primary key rules, see Aurora PostgreSQL table limitations. Aurora checks for a primary key during the initial full sync and when you create a table on an active integration. A table without one enters the FAILED state with the reason SOURCE_TABLE_MISSING_PRIMARY_KEY. (If the table also has a column of an unsupported type, the reason shown is SOURCE_UNSUPPORTED_TYPE.) To fix it, add a primary key at the source, and the integration resyncs the table automatically. If another problem remains, such as an unsupported column type, the table returns to FAILED until you fix that problem too.

  • The source object is not supported: The object is a type that the integration does not replicate. For the list, see Aurora PostgreSQL table limitations.

  • A value is larger than 100 MB: The status_detail value names the column and the supported maximum size. Reduce the value on the source. For the quota, see Quotas.

  • The primary key was dropped from a table that was replicating: Add the primary key back at the source. The integration then resyncs the table automatically. If a data rule excluded the key column, the reason is SOURCE_PK_FILTERED instead. In that case, change the data rule so that it includes the key column. If the key column holds sensitive data, do not include it. A table cannot replicate while a data rule excludes part of its primary key. Define a primary key on non-sensitive columns at the source, or exclude the table.

Data is missing or delayed

If data does not appear in the target, or appears later than you expect, check the following:

  • A change appears in the target within a few minutes. For more information, see How replication works.

  • A table that is resyncing catches up before it returns to SYNCED. For more information, see Resyncing integrations with Amazon S3 Tables.

  • A column is missing from the target. If you excluded the column with a data rule, it is not replicated. The integration does not skip a column that has an unsupported data type. Instead, replication of the whole table fails with the reason SOURCE_UNSUPPORTED_TYPE. For more information, see Unsupported types and values.

  • A query in Amazon Athena fails with the error GENERIC_INTERNAL_ERROR: Get table request failed: com.amazonaws.services.glue.model.ValidationException: Unsupported Federation Resource - Invalid table or column names. Target column names keep the case they have at the source. AWS Glue Data Catalog and AWS Lake Formation do not support tables whose definitions contain uppercase letters, including uppercase column names, so AWS analytics services such as Athena cannot see these tables. To fix this, rename the column to lowercase at the source, or query the table with an engine that reads it directly instead of through the AWS Glue Data Catalog, such as Apache Spark. For more information, see Naming rules for tables and namespaces in the Amazon Simple Storage Service User Guide, Column names, and Querying with Apache Spark.

  • A full sync or change data capture (CDC) is slower than you expect. Check the ReplicationLag metric and the per-table status. For more information, see Metrics and Per-table status.

Replication stopped after an Aurora Global Database switchover or failover

If the source DB cluster is in an Aurora Global Database, a cross-Region switchover or failover stops replication. Logical replication state does not transfer across Regions in a global database, so the integration cannot resume against the new primary DB cluster.

To resume replication, delete the integration and create a new one against the new primary DB cluster in its Region. For instructions, see Deleting integrations with Amazon S3 Tables. For the other Aurora operations that affect an integration, see Aurora operations that affect an integration.