3 Building a serverless image recognition system, part 2

 

This chapter covers

  • Building a simple AI as a Service system
  • Consuming an AI image recognition service
  • Implementing synchronous and asynchronous services
  • Deploying a UI
  • Deploying to the cloud

In this chapter we will continue building our serverless image recognition system that we started in chapter 2. We will add our image recognition service that will call AWS Rekognition to do the hard work for us. Once this is done, we will build a simple front end for our system that will allow us to test our image recognition capabilities.

If you haven’t worked through chapter 2, you should go back and do so now before proceeding with this chapter, as we will be building directly on top of the work that we started there. If you’re good with the content from chapter 2, we can dive right in where we left off and deploy the analysis service.

3.1 Deploying the asynchronous services

In chapter 2 we set up our development environment and deployed the crawler service. In this chapter we will continue with the deployment of the rest of the system, starting with the analysis service.

3.1.1 Analysis service

Let’s take a look at the analysis-service. In a similar manner to the crawler-service, this service is triggered by a message from the Analysis SQS queue once there are images available for analysis in our S3 bucket. An outline of the logic for this service is depicted in figure 3.1.

Figure 3.1 Analysis service

3.2 Implementing the synchronous services

3.2.1 UI service

3.2.2 Front end service

3.3 Running the system

3.4 Removing the system

Summary