
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
gatsby-source-serverless-aurora
Advanced tools
A Gatsby source plugin for pulling data into Gatsby at build time from an AWS Serverless Aurora database.
A Gatsby source plugin for pulling data into Gatsby at build time from an AWS Serverless Aurora database.
Install the plugin:
npm install --save-dev gatsby-source-serverless-aurora
Add the plugin to gatsby-config.js with your Serverless Aurora connection details and any queries you want to perform.
module.exports = {
//... your config here
plugins: [
{
resolve: `gatsby-source-serverless-aurora`,
options: {
connection: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: process.env.AWS_REGION,
resourceArn: process.env.AURORA_RESOURCE_ARN,
secretArn: process.env.AURORA_SECRET_ARN,
databaseName: process.env.AURORA_DB_NAME,
},
queries: [
{
nodeName: `page`,
statement: `SELECT * FROM pages`,
idFieldName: `page_id`,
},
],
},
},
],
};
Re/start your development server with gatsby develop, open GraphiQL and query it like this:
{
allServerlessAuroraPage {
edges {
node {
id
type
row {
page_id
title
}
}
}
}
}
These are all the options you can pass to the plugin:
| Option | Required | Default | Description |
|---|---|---|---|
| connection.accessKeyId | Required | An AWS access key ID. | |
| connection.secretAccessKey | Required | An AWS secret access key. | |
| connection.region | Required | The region for your Serverless Aurora instance. | |
| connection.resourceArn | Required | The Resource ARN for your Serverless Aurora instance. | |
| connection.secretArn | Required | The Secret ARN for your Serverless Aurora instance. | |
| connection.databaseName | Required | The name of the database to use for queries. Can be overridden in each query. | |
| queryBatchSize | 10 | The maximum number of simultaneous queries to perform. | |
| queries[].nodeName | Required | Gives a name to the nodes created by the query, e.g. "page". | |
| queries[].statement | Required | The query to perform. | |
| queries[].idFieldName | "id" | The column to use for the unique ID of the Gatsby nodes. | |
| queries[].databaseName | Optionally query a different database for this query only. | ||
| queries[].parentNodeName | Optionally link nodes created by this query as children of node(s) created by another query. | ||
| queries[].parentMatcher | Optionally filter the parent nodes found with parentNodeName. See below for usage. |
Parent-child relationships can easily be created between different nodes. Parents can have as many children as they like, and children can have as many parents as they like.
"page" to return pages: SELECT * FROM pages."post" to return posts: SELECT * FROM posts.post query you specify the parentNodeName as "page".post query you specify the parentMatcher() function to match the page_id of the post to the page_id of the page.links.children.posts[] property to access the posts owned by a page node.links.parents.pages[] property to access the pages a post node belongs to.queries: [
{
nodeName: `page`,
statement: `SELECT * FROM pages`,
idFieldName: `page_id`,
},
{
nodeName: `post`,
statement: `SELECT * FROM posts`,
idFieldName: `post_id`,
parentNodeName: `post`,
parentMatcher: (post, page) => post.page_id === page.page_id,
},
],
Query it like:
{
allServerlessAuroraPage {
edges {
node {
id
type
row {
page_id
title
}
links {
children {
posts {
id
row {
post_id
title
}
}
}
}
}
}
}
}
The parentMatcher function is passed two nodes, child and parent. It must return true if the child should be linked to the parent, otherwise false.
The child parameter will be a node returned by the current query, and the parent parameter will be a node with a name that matches the parentNodeName option if specified (or all nodes returned by all queries if not).
FAQs
A Gatsby source plugin for pulling data into Gatsby at build time from an AWS Serverless Aurora database.
We found that gatsby-source-serverless-aurora demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.