6 How to be effective with AI as a Service

 

This chapter covers

  • Structuring a serverless project for rapid and effective development
  • Building a serverless continuous deployment pipeline
  • Achieving observability with centralized, structured logs
  • Monitoring serverless project metrics in production
  • Understanding application behavior through distributed tracing

So far, we have built some very compelling AI-based serverless applications. With very little code, these systems have an extraordinary amount of capability. You might have observed, however, that our serverless AI applications have many moving parts. We have adhered to the single responsibility principle, ensuring that each application is composed of many small units, each with a dedicated purpose. This chapter is about effective AI as a Service. By this, we mean that we move beyond simple application prototypes to production-grade applications that are capable of serving real users. For this, we need to think not just about how to get the basics working, but also about when things might stop working.

We have been clear about the advantages of small units of code and off-the-shelf, managed services. Let’s take a step back and think about the pros and cons of this approach from the perspective of architects and developers moving from more traditional software development.

6.1 Addressing the new challenges of Serverless

6.1.1 Benefits and challenges of Serverless

6.1.2 A production-grade serverless template

6.2 Establishing a project structure

6.2.1 The source repository--monorepo or polyrepo

6.2.2 Project folder structure

6.2.3 Get the code

6.3 Continuous deployment

6.3.1 Continuous deployment design

6.3.2 Implementing continuous deployment with AWS services

6.4 Observability and monitoring

6.5 Logs

6.5.1 Writing structured logs

6.5.2 Inspecting log output

6.5.3 Searching logs using CloudWatch Logs Insights

sitemap