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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@aws-mdaa/sm-notebook

v1.3.0

Published

MDAA sm-notebook module

Readme

SageMaker Notebooks

The SageMaker Notebook CDK application is used to configure and deploy secure SageMaker Notebook instances and associated resources.


Deployed Resources and Compliance Details

Mdaa Sagemaker Notebook

KMS CMK - The KMS CMK which will be used to encrypt data on the storage volume attached to the notebook instance.

  • Key usage permission granted to Notebook execution roles by default
  • Additional permissions can be granted via IAM Policy

Notebook LifeCycle Configs - Scripts for customizing Notebooks on creation or startup

Notebook Instances - Secure SageMaker notebook instances.

  • All data at rest will be encrypted using KMS CMK
  • Notebook instances will be VPC bound, and will access internet only via VPC topology (Direct internet access disabled)
  • Notebook instance root access disabled by default (can optionally be enabled)
  • An existing, sufficiently permissive role must be specified for each Notebook
    • Role should have assume role trust for SageMaker service

Notebook Security Group - Will be used by notbook instance to control network access.

  • All egress traffic permitted by default
  • All ingress traffic denied by default

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:

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

Module Config (./sm-notebook.yaml)

Config Schema Docs

# Lifecycle configurations to be created and used by notebooks
lifecycleConfigs:
  example-lifecycle-config:
    # will be run once per startup
    onStart:
      assets:
        testing:
          sourcePath: ./assets
      # example script using list of shell commands
      cmds:
        - echo "testing onStart"
        - sh $ASSETS_DIR/testing/test.sh
    # will be run once when Notebook is provisioned
    onCreate:
      cmds:
        - echo "Testing onCreate"

# If assets are specified in the lifecycleConfigs section,
# assetDeploymentConfig config must specify where assets will be staged on S3
assetDeploymentConfig:
  # Name of the S3 bucket where assets will be staged
  assetBucketName: some-bucket-name
  # (Optional) - The prefix under which assets will be staged on the assetBucket.
  # If not specified, defaults to 'sagemaker-lifecycle-assets/notebooks'
  assetPrefix: sagemaker/assets
  # A role which has write access to the assetBucket and assetPrefix,
  # and which has an assume role trust policy for Lambda.
  assetDeploymentRoleArn: arn:{{partition}}:iam::account:role/example_deployment_role

# List of notebook instances to be created
notebooks:
  #Unique id of the notebook
  notebook-1:
    # Optional notebook name. If not specified, Notebook Id will be used.
    notebookName: "test-notebook-name"
    # ID of the VPC on which notebook will be deployed
    vpcId: vpc-id
    # ID of the subnet on which notebook will be deployed
    subnetId: subnet-id
    # SageMaker instance type of the notebook
    instanceType: ml.t3.medium
    # Ingress rules for the Notebook security group
    securityGroupIngress:
      # In IPV4 CIDR-based rule
      ipv4:
        - cidr: 10.0.0.0/28
          port: 443
          protocol: tcp
    # Egress rules for the Notebook security group
    securityGroupEgress:
      # Allow egress to prefixLists for gateway VPC endpoints
      prefixList:
        - prefixList: pl-4ea54027
          description: prefix list for com.amazonaws.{{region}}.dynamodb
          protocol: tcp
          port: 443
        - prefixList: pl-7da54014
          description: prefix list for com.amazonaws.{{region}}.s3
          protocol: tcp
          port: 443
      # A reference to an existing security group to which egress will be allowed
      sg:
        - sgId: ssm:/ml/sm/sg/id
          port: 443
          protocol: tcp
    # Size of the root volume in GB
    volumeSizeInGb: 10
    # If true, user will have root access to the Notebook
    # Defaults to false
    rootAccess: false
    # Role with which Notebook will be executed
    # Requires an assume role trust policy for "sagemaker.amazonaws.com"
    notebookRole:
      arn: arn:{{partition}}:iam::account:role/sagemaker-role
    # Reference to a lifecycle config created by this module
    lifecycleConfigName: example-lifecycle-config

  # Unique name of a second notebook
  notebook-2:
    vpcId: vpc-id
    subnetId: subnet-id
    instanceType: ml.t3.large
    # ID of a an existing securityGroup
    securityGroupId: sg-123124124
    volumeSizeInGb: 5
    notebookRole:
      name: sagemaker-role
    # Example of a reference to an existing lifecycle config name
    # (created outside of this module)
    lifecycleConfigName: external:existing-lifecycle-config

  # Example notebook using a Cfn Param input for the name.
  # Suitable for use as a Service Catalog product.
  sc-notebook:
    notebookName: "{{param:notebook_name}}"
    vpcId: vpc-id
    subnetId: subnet-id
    instanceType: ml.t3.large
    securityGroupId: sg-12312412421
    volumeSizeInGb: 5
    notebookRole:
      name: sagemaker-role