[FIX] Harden SageMaker notebook defaults in CFN templates - #514
Open
oussamahansal wants to merge 3 commits into
Open
[FIX] Harden SageMaker notebook defaults in CFN templates#514oussamahansal wants to merge 3 commits into
oussamahansal wants to merge 3 commits into
Conversation
noel-improv
approved these changes
Sep 1, 2026
noel-improv
left a comment
Collaborator
There was a problem hiding this comment.
lgtm just a couple of comments:
- The body lists only RootAccess and the KMS parameter, but the two changes with real deployment impact are DirectInternetAccess: Disabled and the subnet move. Both force a notebook replacement on a stack update and drop its public IP.
- Question: With egress now forced through NAT, S3 and Bedrock traffic bills at the NAT data-processing rate. An S3 gateway endpoint is free, might be worth adding while the templates are open?
- Nit: NotebookKmsKeyId takes any string, so a typo fails mid-create instead of at parameter validation. An AllowedPattern would catch it.
Collaborator
Author
Keeping this PR scoped to the fix rather than expanding the VPC resources here we can do that in another pr |
mykola-pereyma
requested changes
Sep 2, 2026
mykola-pereyma
left a comment
Collaborator
There was a problem hiding this comment.
The hardening itself is correct and consistent where applicable (RootAccess + KMS on all 9; DirectInternetAccess + public→private subnet on the self-contained VPC templates). Requesting changes to confirm three functional points are covered — inline. Separately, the PR description still only lists RootAccess + KMS; please also add the DirectInternetAccess: Disabled and public→private subnet changes (they change the notebook's network reachability).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Harden the NeptuneNotebookInstance defaults across all 9 lexical-graph CloudFormation templates
Changes
RootAccess: DisabledNotebookKmsKeyIdparameter +HasNotebookKmsKeycondition;KmsKeyIdset to the CMK when provided (empty default)Problem
Related issue (if any): #
Testing
pytest)Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.