Enhance Existing ML Lifecycles with Amazon SageMaker AI and AWS Fargate
Publication date: March 28, 2022 (Diagram history)
This architecture shows how to enhance your existing ML workflow. With Amazon SageMaker AI model training and AWS Fargate endpoints, you can preserve custom serverless inference while benefiting from managed training.
Enhance Existing ML Lifecycles with Amazon SageMaker AI and AWS Fargate
The following steps describe the architecture:
-
SageMaker AI provides Jupyter Notebook instances for data scientists to prepare their data and launch SageMaker AI training jobs.
-
By selecting the desired algorithm, SageMaker AI image, and configuring the appropriate parameters, you can run multiple SageMaker AI training jobs. You can also benefit from features such as automated hyperparameter tuning.
-
If you need additional algorithms or have pre-existing code, you can build your own SageMaker AI Docker images.
-
A trained model artifact is generated and stored in a dedicated Amazon Simple Storage Service bucket. When the data scientist is satisfied with performance, the model is uploaded to a dedicated path in the bucket.
-
Amazon EventBridge connects to the rest of the ML lifecycle and initiates the remaining lifecycle tasks outside of SageMaker AI.
-
The AWS Step Functions workflow orchestrates all steps of the remaining ML pipeline by using AWS Lambda functions. AWS CodeBuild generates custom Docker images with the correct algorithm, framework, and model.
-
The new container image is tested and deployed into AWS Fargate through AWS CodeDeploy by using blue/green deployment.
-
The SageMaker AI-trained model can now run in your pre-existing compute environment. In this case, Docker containers are deployed in AWS Fargate with Amazon Elastic Container Service (Amazon ECS) automatic scaling.
-
An Application Load Balancer fronts Fargate to balance the incoming load with automatic horizontal scaling based on model endpoint latency.
-
You consume the model through Amazon API Gateway from your browser or mobile application.
-
Amazon Cognito user pool integrated with API Gateway manages authentication and authorization of the endpoint.
Further reading
For additional information, refer to the following resources:
Diagram history
To be notified about updates to this reference architecture diagram, subscribe to the RSS feed.
| Change | Description | Date |
|---|---|---|
Initial publication | Reference architecture diagram first published. | March 28, 2022 |
Note
To subscribe to RSS updates, you must have an RSS plugin enabled for the browser you are using.