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

@aws-mdaa/m2m-api

v1.4.0

Published

MDAA m2m-api module

Downloads

95

Readme

Machine to Machine App

The Machine to Machine CDK app is used to deploy a rest API which can be used to interact with the data lake.

Deployed Resources

M2mApi

  • API Gateway REST API - A REST API which can be used to interact with a Data Lake.
  • Cognito User Pool - Manages client app credentials for access to the API.
  • WAF WebACL - Further restricts access to the API to a list of authorized CIDR blocks.

Configuration

MDAA Config

Add the following snippet to your mdaa.yaml under the modules: section of a domain/env in order to use this module:

          m2m-api: # Module Name can be customized
            module_path: "@aws-caef/m2m-api" # Must match module NPM package name
            module_configs:
              - ./m2m-api.yaml # Filename/path can be customized

Module Config (./m2m-api.yaml)

Config Schema Docs

Sample App Config Contents

api:
  # List of admin roles which will be granted admin access to generated resources
  # (currently KMS key)
  adminRoles:
    - id: test-admin-role-id
  # The target bucket against which API interactions will be executed
  targetBucketName: landing-bucket-name
  # The target prefix in the target bucket
  targetPrefix: testing
  # (Optional) The target prefix for metadata in the target bucket.
  # If not specified, will default to targetPrefix
  metadataTargetPrefix: metadata-testing
  # The reserved concurrency limit for the Lambda which executes the API actions
  concurrencyLimit: 10
  # Additional WAF ACL arns which will be applied to the API Gateway.
  # A default WAF is always generated which applies default deny IP address filtering.
  wafArns:
    test-waf: test-waf-arn
  # The list of allowed IPV4 CIDR ranges which will be permitted access to the API.
  # All other requests will be denied.
  allowedCidrs:
    - 10.0.0.0/8
    - 192.168.0.0/16
    - 172.16.0.0/12
  # (Optional) This role will be used to execute the API integration Lambdas
  # If not specified, one will be created automatically.
  integrationLambdaRoleArn: arn:aws:iam::test-account:role/some-lambda-role-arn

  # (Optional) List of app clients to be added to the Cognito User Pool
  # A Client ID and Secret will be generated for each.
  appClients:
    test-client:
      # (Optional) The validity period of the ID Token in minutes (default 60 minutes).
      # Valid values are between 5 minutes and 1 day
      idTokenValidityMinutes: 60
      #  (Optional) The validity period of the Refresh Token in hours (default 30 days).
      #  Valid values between 60 minutes and 10 years
      refreshTokenValidityHours: 24
      # (Optional) The validity period of the Access Token in minutes (default 60 minutes).
      # Valid values are between 5 minutes and 1 day
      accessTokenValidityMinutes: 24

  # (Optional) Map of accepted request parameter names to boolean indicating if they are required.
  # If specified, API gateway will validate that: 1) each provided parameter is accepted;
  # and 2) all required parameters have been provided.
  requestParameters:
    test_required_param: true
    test_opt_param: false

  # (Optional) Mapping of input event fields to metadata fields written to S3.
  # (The input event is that provided from the API to the Lambda Function)
  eventMetadataMappings:
    Resource: resource
    Host: headers.Host
    UserAgent: headers.User-Agent
    IPForwarding: headers.X-Forwarded-For
    RequestTime: requestContext.requestTime
    queryStringParameters: queryStringParameters