You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable setting VPC config when creating/deploying models (#412)
* Create SageMaker Models including optional VpcConfig
Models created from Estimator or Training Job use the same VpcConfig
* Adjust naming, preparing, and passing vpc_config in base classes Estimator, Model, Session
* Add optional vpc_config parameter for Amazon/Frameworks models
* Improve integ test coverage of VPC features
Configure subnets and security groups to support multi-node VPC jobs and endpoints
Implement more VPC integ tests covering several Estimators and Predictors
* Update changelog
* Add vpc_utils with constants and utilities for handling VpcConfig
* Rename/refactor parameter vpc_config_override for models created from estimators
* Consolidate VPC integ tests to a single TensorFlow multi-instance case
* Tweaks to vpc_utils: make VPC_CONFIG_DEFAULT immutable and rename validate to sanitize
* Add integ test for transform with vpc config
* Update README with SageMaker VPC documentation and examples
* Remove tests/integ/test_vpc.py
11. `Secure Training and Inference with VPC <#secure-training-and-inference-with-vpc>`__
40
+
12. `BYO Model <#byo-model>`__
40
41
41
42
42
43
Installing the SageMaker Python SDK
@@ -458,6 +459,71 @@ You can also specify other attributes of your data, such as the content type.
458
459
For more details about what can be specified here, see `API docs <https://sagemaker.readthedocs.io/en/latest/transformer.html#sagemaker.transformer.Transformer.transform>`__.
459
460
460
461
462
+
Secure Training and Inference with VPC
463
+
--------------------------------------
464
+
465
+
Amazon SageMaker allows you to control network traffic to and from model container instances using Amazon Virtual Private Cloud (VPC).
466
+
You can configure SageMaker to use your own private VPC in order to further protect and monitor traffic.
467
+
468
+
For more information about Amazon SageMaker VPC features, and guidelines for configuring your VPC,
469
+
see the following documentation:
470
+
471
+
- `Protect Training Jobs by Using an Amazon Virtual Private Cloud <https://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html>`__
472
+
- `Protect Endpoints by Using an Amazon Virtual Private Cloud <https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html>`__
473
+
- `Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud <https://docs.aws.amazon.com/sagemaker/latest/dg/batch-vpc.html>`__
474
+
- `Working with VPCs and Subnets <https://docs.aws.amazon.com/vpc/latest/userguide/working-with-vpcs.html>`__
475
+
476
+
You can also reference or reuse the example VPC created for integration tests: `tests/integ/vpc_test_utils.py <tests/integ/vpc_test_utils.py>`__
477
+
478
+
To train a model using your own VPC, set the optional parameters ``subnets`` and ``security_group_ids`` on an ``Estimator``:
479
+
480
+
.. code:: python
481
+
482
+
from sagemaker.mxnet import MXNet
483
+
484
+
# Configure an MXNet Estimator with subnets and security groups from your VPC
485
+
mxnet_vpc_estimator = MXNet('train.py',
486
+
train_instance_type='ml.p2.xlarge',
487
+
train_instance_count=1,
488
+
subnets=['subnet-1', 'subnet-2'],
489
+
security_group_ids=['sg-1'])
490
+
491
+
# SageMaker Training Job will set VpcConfig and container instances will run in your VPC
Likewise, when you create ``Transformer`` from the ``Estimator`` using ``transformer()``, the same VPC configurations will be set on the SageMaker Model:
516
+
517
+
.. code:: python
518
+
519
+
# Creates a SageMaker Model using the same VpcConfig
0 commit comments