Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graphql-editor/zeit-aurora-integration
Integration of zeit now with AWS Aurora - Easy serverless SQL database
https://github.com/graphql-editor/zeit-aurora-integration
aurora integration serverless sql zeit
Last synced: 4 days ago
JSON representation
Integration of zeit now with AWS Aurora - Easy serverless SQL database
- Host: GitHub
- URL: https://github.com/graphql-editor/zeit-aurora-integration
- Owner: graphql-editor
- License: mit
- Created: 2019-06-01T07:21:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T00:41:49.000Z (over 2 years ago)
- Last Synced: 2024-10-24T16:49:13.449Z (19 days ago)
- Topics: aurora, integration, serverless, sql, zeit
- Language: TypeScript
- Homepage:
- Size: 47.9 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![](./gfx/zeit-aurora-feature-integration.jpg)
# Zeit now aurora integration
This is (https://zeit.co)[zeit.now] integration for (https://aws.amazon.com/rds/aurora/)[AWS Aurora] Data Http API. Create Serverless SQL in minutes
## How to use it
1. Add AWS Aurora - Serverless SQL integration.
2. Setup with your AWS Account
3. Add new cluster
4. Link the cluster to the projectAfter that new env variables are added to your zeit project
### Env variables
```
AURORA_SECRET_ACCESS_KEY
AURORA_ACCESS_KEY_ID
AURORA_SECRET_ARN
AURORA_CLUSTER_NAME
AURORA_CLUSTER_ARN
AURORA_REGION
``````ts
import micro from "micro";
import AWS from "aws-sdk";export default micro(async (req, res) => {
const rdsDataService = new AWS.RDSDataService({
accessKeyId: process.env.AURORA_ACCESS_KEY_ID,
region: process.env.AURORA_REGION,
secretAccessKey: process.env.AURORA_SECRET_ACCESS_KEY
});const params = {
secretArn: process.env.AURORA_SECRET_ARN!,
resourceArn: process.env.AURORA_CLUSTER_ARN!,
sql: `CREATE DATABASE cats`
};// const params = {
// secretArn: process.env.AURORA_SECRET_ARN!,
// resourceArn: process.env.AURORA_CLUSTER_ARN!,
// sql: `SELECT * from cats where id=:id`,
// parameters: [
// {
// name: "id",
// value: {
// longValue: 1
// }
// }
// ]
// };let data = await rdsDataService.executeStatement(params).promise();
return "done";
});```
You can run this sample code in your zeit instance
## To be done
- [x] Setup with AWS keys
- [x] Add Aurora Cluster
- [x] Remove Aurora Cluster
- [x] Connect Aurora Cluster to project
- [x] Autogenerate cluster name
- [ ] Provide more examples
- [ ] Disconnect clusters from project
- [ ] Provide cluster with name and description
- [ ] Implement separate IAM Accounts for project runners