npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pinecone-db-construct

v0.0.10

Published

A CDK construct for Pinecone Indexes

Readme

Pinecone DB Icon

Pinecone DB Construct for AWS CDK

CI NPM version PyPI version License

The Pinecone DB Construct for AWS CDK is a JSII-constructed library that simplifies the creation and management of Pinecone indexes in your AWS infrastructure. It allows you to define, configure, and orchestrate your vector database resources alongside your AWS resources within your CDK application.

Features

  • Define Pinecone index configurations in code using familiar AWS CDK constructs.
  • Automate the setup and configuration of Pinecone resources with AWS Lambda and AWS Secrets Manager.
  • Seamlessly integrate Pinecone DB into your cloud-native applications.
  • Supports ARM serverless for deployments

Installation

Install this construct library using npm or pip, depending on your development language:

For TypeScript/JavaScript users:

npm install pinecone-db-construct

For Python users:

pip install pinecone-db-construct

Usage

TypeScript

Below is an example demonstrating how to use the Pinecone DB Construct in a TypeScript CDK application:

import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { PineconeIndex, PineConeEnvironment } from '../index';

class MyStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    new PineconeIndex(
      this,
      'PineconeIndex',
      {
        indexSettings: [{
          apiKeySecretName: 'pinecone-test',  // store as a string in secrets manager, NOT a key/value secret
          dimension: 128,
          removalPolicy: RemovalPolicy.RETAIN_ON_UPDATE_OR_DELETE,
          // Pod Index (see python example for serverless)
          podSpec: {
            environment: PineConeEnvironment.GCP_STARTER,
          },
        }],
        deploymentSettings: {
          maxNumAttempts: 2,
        },
      },
    );
  }
}

const APP = new App();

new MyStack(APP, 'MyStack');

APP.synth();

Python

For CDK applications written in Python, you can use the construct as shown:

from constructs import Construct
from aws_cdk import (
    App,
    RemovalPolicy,
    Stack,
)
from pinecone_db_construct import (
    PineconeIndex,
    CloudProvider,
    Region,
    PineconeIndexSettings,
    ServerlessSpec,
    DeploymentSettings,
)s
  

class MyStack(Stack):
    def __init__(self, scope: Construct, id: str, **kwargs) -> None:
        super().__init__(scope, id, **kwargs)

        PineconeIndex(
            self,
            'PineconeIndex',
            index_settings=[
                PineconeIndexSettings(
                    api_key_secret_name='pinecone-test',  # store as a string in secrets manager, NOT a key/value secret
                    dimension=128,
                    removal_policy=RemovalPolicy.RETAIN_ON_UPDATE_OR_DELETE,
                    # Serverless Index (see typescript example for Pod)
                    pod_spec=ServerlessSpec(
                        cloud_provider=CloudProvider.AWS,
                        region=Region.US_WEST_2,
                    ),
                ),
            ],
            deployment_settings=DeploymentSettings(
                max_num_attempts=2,
            ),
        )

APP = App()

MyStack(APP, 'MyStack')

APP.synth()

Common Issues

If running the ARM deployment architecture (configurable through the deploymentSettings prop) and deploying ON (not to) an x86_64 machine, you may run into the dreaded exec /bin/sh: exec format error, if this happens you have two options:

  1. Switch to x86 architecture (Lame 😒):
new PineconeIndex(
this,
'PineconeIndex',
{
  deploymentSettings: {
    deploymentArchitecture: lambda.Architecture.X86_64,
  },
  .
  .
  .
})
  1. Allow docker to emulate ARM (Better 💪):
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Note: first time bundling in emulation mode will be slower when running in emulation mode, so keep that in mind (adds about 40 sec for first time deployment). Most most CICD environments will do this for you (github actions) with do this emulation out of the box for you.

Contributing

I'd love if you wanted to contribute, provide feedback, and/or report bugs. Before you contribute, please read the contributing guidelines.