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

@floci/testcontainers

v0.1.0

Published

Testcontainers module for Floci — the open-source local AWS emulator

Downloads

4,512

Readme

@floci/testcontainers

npm version Node versions CI License: MIT

Node.js Testcontainers module for Floci — the open-source, drop-in replacement for LocalStack Community Edition.

Floci emulates 41 AWS services in a single container with:

  • ~24 ms startup time (native image)
  • ~13 MiB idle memory
  • ~90 MB Docker image
  • No auth tokens, no feature gates, MIT license

Installation

# npm
npm install --save-dev @floci/testcontainers

# yarn
yarn add --dev @floci/testcontainers

# pnpm
pnpm add --save-dev @floci/testcontainers

Quick start

import { S3Client, CreateBucketCommand, ListBucketsCommand } from '@aws-sdk/client-s3';
import { FlociContainer } from '@floci/testcontainers';

describe('S3', () => {
  let floci: Awaited<ReturnType<FlociContainer['start']>>;

  beforeAll(async () => {
    floci = await new FlociContainer().start();
  });

  afterAll(async () => {
    await floci.stop();
  });

  it('creates and lists a bucket', async () => {
    const s3 = new S3Client({
      endpoint: floci.getEndpoint(),
      region: floci.getRegion(),
      credentials: {
        accessKeyId: floci.getAccessKey(),
        secretAccessKey: floci.getSecretKey(),
      },
      forcePathStyle: true,
    });

    await s3.send(new CreateBucketCommand({ Bucket: 'my-bucket' }));
    const { Buckets } = await s3.send(new ListBucketsCommand({}));
    expect(Buckets?.map((b) => b.Name)).toContain('my-bucket');
  });
});

Sharing a container across tests

import { FlociContainer, StartedFlociContainer } from '@floci/testcontainers';

let floci: StartedFlociContainer;

beforeAll(async () => {
  floci = await new FlociContainer().start();
});

afterAll(async () => {
  await floci.stop();
});

Service configuration

Each of Floci's 41 services can be configured individually using typed config classes.

S3

import { FlociContainer, S3Config } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withS3Config(new S3Config(true, 7200))
  .start();

SQS

import { SqsConfig } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withSqsConfig(new SqsConfig(true, 60, 262144))
  .start();

DynamoDB

import { DynamoDbConfig } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withDynamoDbConfig(new DynamoDbConfig(true))
  .start();

Lambda

import { LambdaConfig } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withLambdaConfig(new LambdaConfig(
    true,   // enabled
    256,    // defaultMemoryMb
    30,     // defaultTimeoutSeconds
    false,  // ephemeral
    true,   // hotReloadEnabled
  ))
  .start();

RDS (PostgreSQL / MySQL / MariaDB)

import { RdsConfig } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withRdsConfig(new RdsConfig(true, 7001, 99, 'postgres:16-alpine'))
  .start();

ElastiCache (Redis / Valkey)

import { ElastiCacheConfig } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withElastiCacheConfig(new ElastiCacheConfig(true, 'valkey/valkey:8'))
  .start();

OpenSearch

import { OpenSearchConfig } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withOpenSearchConfig(new OpenSearchConfig(true, false))
  .start();

MSK (Kafka via Redpanda)

import { MskConfig } from '@floci/testcontainers';

const floci = await new FlociContainer()
  .withMskConfig(new MskConfig(true, false, 'redpandadata/redpanda:latest'))
  .start();

All available config classes

| Config class | AWS service | |---|---| | AcmConfig | AWS Certificate Manager | | ApiGatewayConfig | API Gateway (v1) | | ApiGatewayV2Config | API Gateway (v2) | | AppConfigConfig | AppConfig | | AppConfigDataConfig | AppConfig Data | | AthenaConfig | Athena | | BedrockRuntimeConfig | Bedrock Runtime | | CloudFormationConfig | CloudFormation | | CloudWatchLogsConfig | CloudWatch Logs | | CloudWatchMetricsConfig | CloudWatch Metrics | | CodeBuildConfig | CodeBuild | | CodeDeployConfig | CodeDeploy | | CognitoConfig | Cognito | | DynamoDbConfig | DynamoDB | | Ec2Config | EC2 | | EcrConfig | ECR | | EcsConfig | ECS | | EksConfig | EKS | | ElastiCacheConfig | ElastiCache | | ElbV2Config | ELB v2 | | EventBridgeConfig | EventBridge | | FirehoseConfig | Kinesis Firehose | | GlueConfig | Glue | | IamConfig | IAM | | KinesisConfig | Kinesis | | KmsConfig | KMS | | LambdaConfig | Lambda | | MskConfig | MSK (Kafka) | | OpenSearchConfig | OpenSearch | | PipesConfig | EventBridge Pipes | | RdsConfig | RDS | | ResourceGroupsTaggingConfig | Resource Groups Tagging | | S3Config | S3 | | SchedulerConfig | EventBridge Scheduler | | SecretsManagerConfig | Secrets Manager | | SesConfig | SES | | SesV2Config | SES v2 | | SnsConfig | SNS | | SqsConfig | SQS | | SsmConfig | SSM Parameter Store | | StepFunctionsConfig | Step Functions |

Container options

const floci = await new FlociContainer('floci/floci:latest')  // pin a specific tag
  .withRegion('eu-west-1')
  .withAccountId('111122223333')
  .withAvailabilityZone('eu-west-1a')
  .withDedicatedNetwork()   // isolated Docker network for stateful services
  .start();

Connection details

| Method | Returns | |---|---| | getEndpoint() | http://host:port — pass as endpoint to AWS SDK clients | | getRegion() | AWS region string | | getAccessKey() | Access key ("test" by default) | | getSecretKey() | Secret key ("test" by default) | | getAccountId() | AWS account ID | | getMappedPort(port) | Host port mapped from the given container port |

Docker image variants

| Tag | Description | |---|---| | floci/floci:latest | Native image — sub-second startup (recommended) | | floci/floci:x.y.z | Pinned release (native) |

Requirements

  • Node.js 18+
  • Docker (running locally or in CI)
  • testcontainers >= 10.0.0

Related projects

License

MIT