Back in September we blogged about the GA of Amazon’s Serverless Aurora and how it really simplifies scaling database servers in the cloud – mainly because.. well basically you don’t have to. At AWS re:Invent 2018 last month, Amazon has taken Aurora Serverless to the next level with its ‘Data API’.
For all those developers out there who have had forever, in their applications and code, to deal with with the management and configuration of persistent database connections, connection pools, and various ‘driver’ libraries then this will be a very welcome feature indeed.
The Data API doesn’t require a persistent connection to the DB cluster. Instead, it provides a secure HTTP endpoint and integration with AWS SDKs. You can use the endpoint to execute SQL statements in the same way as you do through the MySQL native protocol, but without managing connections. The API returns query results in JSON format. All calls to the Data API are synchronous. A call times out and is terminated in one minute if it’s not finished processing.
The API uses database credentials stored in AWS Secrets Manager, so you don’t need to pass credentials in the API calls. If you are using AWS Lambda, the API provides a secure way for you to access your DB cluster without configuring a Lambda function to access resources in an Amazon VPC.
When you enable the Data API, you can also use the new RDS query editor for Aurora Serverless. With this you can run SQL queries in the RDS console. You can run any valid SQL statement on the Aurora Serverless DB cluster, including data manipulation and data definition statements.
Though still only in beta, available only to MySQL-compatibles editions of Amazon Aurora Serverless and albeit with some limitations, it still offers some advantages and a whole lot of potential.
It should also me mentioned that AWS’s Data API is Only available in the US East Region at present.