Chapter 5. Building Multistack CDK Applications
In this chapter, you will modify your “Hello, CDK” application to form the foundation of the Home Energy Coach application. You will create CDK stacks for shared resources and the data pipeline. You will build upon your existing application by repurposing your S3 bucket and Lambda function as a data pipeline. This pipeline will allow you to upload home energy usage data and receive a summary of total energy consumed. You can either use a provided sample dataset or fill in the data template with information from your own utility bill. This chapter will prepare you for the next one, where you will learn multiple ways to package Lambda functions.
The projects are going to get progressively more involved, starting here. There is a jump from the earlier intro chapters to what you will make in this chapter. We know it is tough, but take your time, and we are confident you will be able to continue building cool stuff.
Project Architecture: Data Pipeline Microservice
In this project segment, you will build a data pipeline microservice that allows a user to upload a .csv file containing home energy usage data to an S3 bucket. The system uses Amazon EventBridge to trigger an AWS Lambda function, which then summarizes the total energy used in kilowatt hours (kWh). Figure 5-1 illustrates the application flow up to this point. We use EventBridge to take specific actions based on the incoming data.
Figure 5-1. Serverless data pipeline architecture ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access