aws-samples / sagemaker-run-notebook

Tools to run Jupyter notebooks as jobs in Amazon SageMaker - ad hoc, on a schedule, or in response to events
Apache License 2.0
140 stars 68 forks source link

Use VPC configuration when launching job #18

Open amit-surana opened 3 years ago

amit-surana commented 3 years ago

Hi Team, Can we add a feature to pass vpc configuration from plugin which can be used by CreateProcessingJob? There are customers who use VPCE endpoint to connect to their on-premise services from their notebook and when job is running in service accounts job fails since job won't have access to vpce endpoints.

tomfaulhaber commented 2 years ago

This is a reasonable ask. It's not currently supported in the GUI plugin.

As a workaround, I think you can do this using the CLI run-notebook run --extra ... and including the VPC config arguments to CreateProcessingJob but I haven't tried it myself.

lasdem commented 2 years ago

Thank you! I managed to get it working with running the job via command line by passing the Networking Config as --extra --extra '{ "NetworkConfig": { "EnableInterContainerTrafficEncryption": false, "EnableNetworkIsolation": false, "VpcConfig": { "SecurityGroupIds": [ "sg-xxx" ], "Subnets": [ "subnet-xxx" ] } } }'

I would really like if the UI would pass the vpc config from the sagemaker domain automatically.