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 🙏

© 2024 – Pkg Stats / Ryan Hefner

aws4-proxy

v0.1.8

Published

Fast, low-footprint aws4 signing proxy with WebSocket support

Downloads

12

Readme

npm GitHub Workflow Status Apache License Dependencies

aws4-proxy

Fast, low-footprint aws4 signing proxy with WebSocket support

# Create a signing proxy to S3 and then use the CLI to access without signing
aws4-proxy --service s3 --region us-east-1
aws s3 ls --endpoint http://localhost:3000 --no-sign-request

# Proxy to an API Gateway with AWS_IAM authentication and query using curl
aws4-proxy --service execute-api --region eu-west-1 --endpoint api.mycorp.com
curl http://localhost:3000/v1/my-api/

# Proxy to an Elasticsearch instance with IAM authentication and open Kibana
aws4-proxy --service es --region us-east-2 --endpoint search-nfvgk3cqs3nk3u.us-east-2.es.amazonaws.com
open http://localhost:3000/_plugin/kibana/

# Proxy to a Neptune DB that sits behind a Network Load Balancer with a custom domain name
aws4-proxy --service neptune-db --endpoint neptune.mycorp.com --endpoint-host cluster-die4eenu.cluster-eede5pho.eu-west-1.neptune.amazonaws.com --region eu-west-1
wscat localhost:3000/gremlin

Command line options:

Options:

  • --help Show help [boolean]

  • --service string [required]

  • --region string [required] [default: "AWS_DEFAULT_REGION"]

  • --version Show version number boolean

  • --level [default: "info"]

  • --host, -h [default: "127.0.0.1"]

  • --port, -p number [default: 3000]

  • --endpoint string

    Required for services that provide a unique endpoint per resource such as the API Gateway, Neptune, Elasticsearch Service, etc.

  • --endpoint-host string

    If the endpoint is accessed via a custom hostname (e.g. using a CNAME record or a custom load balancer) provide the original endpoint hostname. Depending on the service, this is required for the signature to be valid.

Installation

npm install --global aws4-proxy

# or without installing
npx aws4-proxy --help

Authentication

The proxy will check for the availability of the aws-sdk package (not installed as part of this package). If available it uses the CredentialProviderChain class which will automatically locate and load credentials. If the package is not available, credentials are loaded from environment variables only (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and optionally AWS_SESSION_TOKEN).

Features

  • Supports WebSocket (e.g. Neptune, API Gateway)
  • No limit on body size
  • Efficient and fast
  • Few external dependencies
  • Supports proxying Kibana for Elasticsearch Service
  • Ability to separately define the hostname used for signing (necessary if your endpoint is behind a custom domain)