Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-api-local

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-api-local

AWS Aurora Serverless Data API emulator for local development.

  • 0.0.2-alpha.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
182
increased by14.47%
Maintainers
1
Weekly downloads
 
Created
Source

Data API Local

AWS Aurora Serverless Data API emulator for local development.

Note: Currently only supports PostgreSQL - MySQL is on the roadmap.

Example:

import * as RDSDataService from 'aws-sdk/clients/rdsdataservice'
import { dataApiLocal } from './data-api-local'

// assuming your in an async function
await dataApiLocal({
  server: {
    hostname: 'localhost',
    port: 8080
  },
  database: {
    engine: 'postgresql',
    port: 54320,
    user: 'test',
    password: 'test'
  }
})

const client = new RDSDataService({
  endpoint: 'http://localhost:8080',
  region: 'us-east-1',
  // If you have an AWS profile or running this in a role, this isn't required
  credentials: {
    accessKeyId: 'SECRET_ID',
    secretAccessKey: 'SECRET_KEY'
  }
})

const result = await client.executeStatement({
  sql: 'SELECT * FROM "users" WHERE id = :id',
  parameters: [{
    name: 'id',
    value: {
      longValue: 42
    }
  }],
  database: 'example'
  // secretArn and resourceArn are not used but are required for the AWS SDK
  secretArn: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:dummy',
  resourceArn: 'arn:aws:rds:us-east-1:123456789012:cluster:dummy'
}).promise()

Keywords

FAQs

Package last updated on 29 Dec 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc