I am trying to connect AppSync to an Aurora serverless data source but it shows this when I try to create the data source through the AWS console:
My AppSync API is in ap-southeast-1 (Singapore) and my Aurora Serverless database is also in the same region. According to the AWS docs, the Data API is avaiable in that region. Here is my cloudformation template to deploy the DB Cluster:
DbCluster:
Type: AWS::RDS::DBCluster
DependsOn: DbSecret
Properties:
DatabaseName: !Ref DatabaseName
DBClusterIdentifier: !Ref DbClusterId
DeletionProtection: false
EnableHttpEndpoint: true
Engine: aurora
EngineMode: serverless
EngineVersion: 5.6.10a
MasterUsername: !Join ['', ['{{resolve:secretsmanager:', !Ref DbSecret, ':SecretString:username}}']]
MasterUserPassword: !Join ['', ['{{resolve:secretsmanager:', !Ref DbSecret, ':SecretString:password}}']]
ScalingConfiguration:
AutoPause: true
MinCapacity: 1
MaxCapacity: 2
SecondsUntilAutoPause: 300
StorageEncrypted: true
The CloudFormation template deploys fine, and, as you can see, the EnableHttpEndpoint
has been set to true
, which means that the Data API is enabled. I have also checked that it is enabled by going into the AWS console to try and modify the database:
I have tried searching the internet for any clues but I could not find anything. I'm not sure if this is a bug or I am doing something wrong. How do I get pass this error to create my data source?
After creating a support case, I have found that the Data API is available in the region, just that AppSync is not integrated to that region. In other words, Data API is available but AppSync can't use it in that region.
As an alternative, I am planning to run AWS AppSync Lambda resolvers which will call the Data API. This is only because I need the database to be ap-southeast-1.
If you do not require your database to be in an unsupported region, you can try using AppSync in ap-southeast-1 while having your database in a supported region (us-east-1 will most likely work).