Designing an Automated Solution for AI Application with AWS Services

Automated Solution for AI Application

Prev Question Next Question

Question

A company offering AI solutions has built an application that relies on AWS SageMaker and AWS DeepLens which integrate with Amazon Rekognition for advanced image analysis.

Amazon SageMaker is training its models.

They plan to orchestrate all processes with several, existing AWS Lambda functions, automate the build and deployment of their machine learning models, and respond automatically as new images are added to an Amazon S3 bucket.

As a DevOps engineer, you have to design an automated solution compatible with the current architecture to deal with this use case.

Which automation option is the most appropriate in this application?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: D.

This is another example of AWS Step Functions acting as an orchestrator of complex workflows.

In this case, there are already some AWS Lambda functions in place and machine learning services.

AWS Step Functions can automate the build and deployment of these models and also acts after events in an Amazon S3 bucket.

This is the most appropriate automation option in this application.

Incorrect Answers:

Options A, C is incorrect because AWS Data Pipeline does not orchestrate workloads in this sort of scenario.

Option B is incorrect because it is confusing AWS Lambda as a tool to orchestrate this complex set of services.

The right service to automate a solution compatible with the current architecture is AWS Step Functions.

References:

https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-cloudwatch-events-s3.html https://aws.amazon.com/blogs/machine-learning/automated-and-continuous-deployment-of-amazon-sagemaker-models-with-aws-step-functions/

The most appropriate automation option in this application is D. Configure a state machine as a target for a CloudWatch Events rule, configure a trail in AWS CloudTrail to receive those events. Add another layer of AWS Step Functions that orchestrates all existing AWS Lambda functions along with the serverless function that responds to Amazon S3 bucket events. Automation and deployment of Amazon SageMaker models can be managed by AWS Step Functions.

Here is an explanation of each part of the answer:

  1. Configure a state machine as a target for a CloudWatch Events rule: This means that we can use CloudWatch Events to monitor for certain events, such as when new images are added to the S3 bucket. When this event occurs, CloudWatch Events can trigger a state machine to start the workflow.

  2. Configure a trail in AWS CloudTrail to receive those events: AWS CloudTrail provides a history of AWS API calls made on the AWS account. By configuring a trail in AWS CloudTrail, we can track and log all the events related to this application, including events related to SageMaker, DeepLens, and Amazon Rekognition.

  3. Add another layer of AWS Step Functions that orchestrates all existing AWS Lambda functions along with the serverless function that responds to Amazon S3 bucket events: AWS Step Functions can be used to orchestrate the workflow of multiple AWS Lambda functions. In this case, we can use AWS Step Functions to orchestrate the existing AWS Lambda functions and the serverless function that responds to new images being added to the S3 bucket.

  4. Automation and deployment of Amazon SageMaker models can be managed by AWS Step Functions: AWS Step Functions can be used to automate the deployment of Amazon SageMaker models. This means that when a new version of a model is trained, it can be automatically deployed using AWS Step Functions.

In summary, the solution involves using CloudWatch Events to trigger a state machine, configuring AWS CloudTrail to track all events, using AWS Step Functions to orchestrate the workflow of existing Lambda functions and serverless functions, and using AWS Step Functions to automate the deployment of Amazon SageMaker models. This provides a robust and automated solution that is compatible with the current architecture.