Statistics
7
Views
0
Downloads
0
Donations
Support
Share
Uploader

高宏飞

Shared on 2026-03-21

AuthorSam Ward Biddle, Kyle T Jones

Looking to accelerate development and build cloud native applications with AWS Cloud Development Kit? Through hands-on projects, you'll learn the basics of AWS CDK, the tool of choice for many of the world's largest technology companies. Informed by real case studies and years of work with enterprise-scale cloud architectures, this book will benefit both novice and advanced cloud developers. It's complete with step-by-step explanations of essential concepts, practical examples, and self-assessment questions to help you build a shareable portfolio of completed projects, demonstrating your ability to build cloud infrastructure at scale. You'll explore: Basic cloud computing concepts, including the AWS Well-Architected Framework End-to-end cloud native software and infrastructure as code The benefits of a reusable code library to accelerate your projects Functional modules of code that can stand alone or build toward an integrated cloud application

Tags
No tags
ISBN: 1098158776
Publisher: O'Reilly Media
Publish Year: 2025
Language: 英文
Pages: 520
File Format: PDF
File Size: 4.6 MB
Support Statistics
¥.00 · 0times
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

(This page has no text content)
Praise for Hands-On AWS CDK AWS CDK has an empowering role. With many young people globally as agents of change utilizing tech-driven solutions that cross borders, this book is a welcome toolkit. As cloud native technologies such as AWS CDK continue to evolve, they open up new opportunities for young developers around the world to participate in building scalable, automated infrastructure. By leveraging the power of programming languages, youth can contribute to the global movement of technology-driven international development, creating more accessible, efficient, and sustainable solutions for the future. —Eunice Ajambo, economist, United Nations This is an exceptional resource that not only demystifies cloud infrastructure but equips you to build real, impactful solutions with confidence. The practical, project-driven approach makes it a must-read for anyone serious about mastering cloud native development in AWS. —Jeffrey Rosenbaugh, senior director of professional services, Lucid Software
Finally, a hands-on, project-based CDK book that takes readers on a very enjoyable journey to learning the AWS CDK. The writing style, content breadth, and depth applied to a fun and useful project make the book hard to put down, except to get your hands on the keyboard to get coding. —Andy Taylor, senior network solutions architect at AWS and self-confessed network automation nerd Hands-On AWS CDK offers a brilliantly structured and project-driven approach, making it the ultimate guide for developers to master cloud native application development using AWS CDK while building real-world, portfolio-ready projects. With its emphasis on hands-on learning, practical examples, and thoughtful explanations, this book not only teaches the technical aspects of AWS CDK but also fosters a deeper understanding of modern cloud practices, including automation, security, and generative AI integration. —Gwanhoo Lee, PhD, chair of the department of Information Technology and Analytics, American University
Hands-On AWS CDK works for everyone, whether you’re just starting out or you’re a seasoned pro. Beginners can follow the step-by-step projects to build their skills, while experienced developers can jump around to find exactly what they need. It’s a practical guide that grows with you as you learn. —Andrew Humphreys, director of product management, HyperTunnel
Hands-On AWS CDK Building Cloud Native Applications with Infrastructure as Code Sam Ward Biddle and Kyle T. Jones
Hands-On AWS CDK by Sam Ward Biddle and Kyle T. Jones Copyright © 2025 Sam Ward Biddle and Kyle T. Jones. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://oreilly.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com. Acquisitions Editor: Megan Laddusaw Development Editor: Michele Cronin Production Editor: Aleeya Rahman Copyeditor: Krsta Technology Solutions Proofreader: Audrey Doyle Indexer: nSight, Inc.
Interior Designer: David Futato Cover Designer: Karen Montgomery Illustrator: Kate Dullea April 2025: First Edition Revision History for the First Edition 2025-04-14: First Release See https://www.oreilly.com/catalog/errata.csp? isbn=0636920963257 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Hands-On AWS CDK, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. The views expressed in this work are those of the authors and do not represent the publisher’s views. While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights. 978-1-098-15877-4 [LSI]
Preface The AWS Cloud Development Kit (CDK) is an open source software development framework that enables developers to define cloud infrastructure using familiar programming languages such as Python, TypeScript, Java, C#, and others instead of traditional JSON or YAML templates. The development of AWS CDK has evolved over time, driven by the need for a more efficient and familiar way to define and manage cloud resources. The idea for the CDK originated from customer feedback and the recognition that traditional Infrastructure as Code (IaC) tools using static configuration files had limitations in terms of expressiveness, reusability, and productivity. AWS CDK was introduced in 2018 as a new approach to IaC, allowing developers to define cloud infrastructure using their preferred programming languages, leveraging the full power of their language’s features and ecosystem. Since its initial release, AWS CDK has undergone continuous development and improvement. AWS has actively engaged with the community to gather feedback and make updates to the framework based on user needs. AWS CDK has seen regular
updates with new features, bug fixes, and improvements to its performance, stability, and usability. The development of AWS CDK has also been influenced by the growing adoption of cloud native application development practices, such as DevOps and GitOps, which emphasize automation, repeatability, and versioning of infrastructure configurations as code. AWS CDK has integrated with popular development tools and practices, including integrated development environments (IDEs), source code repositories, continuous integration and continuous deployment (CI/CD) pipelines, and AWS CloudFormation, to provide a seamless and efficient experience for developers. AWS CDK has been extended to support multiple programming languages, allowing developers to choose the language that best fits their team’s skills and preferences. This has expanded the adoption of AWS CDK across a wide range of development communities, making it a popular choice for defining cloud infrastructure in a more familiar and productive way.
How This Book Is Structured This book follows a “project-first” approach. Feel free to skip to Chapter 1 if you want to get straight to building, and return to the Preface when you have questions. If you like guidance before you start building, read on. This book is an all-in-one project-based practical introduction to AWS CDK written for builders by builders. Through the course of this book, you will build two complete and well-architected cloud native applications. The first project is a digital Home Energy Coach complete with a data pipeline, serverless web application with authentication, and recommendation engine that we will build together bit by bit over the course of the book. Want to see what you will build? You can take a look at some artifacts from the sample project at https://github.com/hands-on-aws-cdk-book/hands-on-aws-cdk- book-projects. This is also where you will find the code for the projects in this book. We recommend bookmarking this repository, and if you think it’s useful, you can even give it a star. We will start from scratch and progressively add additional elements to the project with each chapter. The second project is
your own version of the first project. It will be unique to you and is intended to solve a problem specific to your interests, business, or engineering responsibilities. As you will see, the magic of CDK is in how common constructs can be used to build a variety of solutions. Throughout the book, we will encourage you to document, write tests, and push your projects to a GitHub repository that will become your CDK portfolio. Share your portfolio with current or prospective employers, friends, or the open source community. We invite you to join the Hands-on AWS CDK community and share links to your projects, screenshots, and video tours. We love demos. Why CDK? The AWS CDK is a unique IaC solution that offers several benefits compared to other IaC providers, such as traditional JSON or YAML templates, as well as other popular frameworks like Terraform or CloudFormation: Familiar programming languages CDK allows developers to define cloud infrastructure using familiar programming languages like Python,
TypeScript, Java, C#, and others. This makes it easier for developers to leverage their existing programming skills and knowledge, resulting in increased productivity and a reduced learning curve. Higher-level abstractions CDK provides higher-level abstractions, known as constructs, that encapsulate common cloud patterns and best practices. This enables developers to define infrastructure using reusable and composable components, making it easier to create and manage complex infrastructure configurations with less code. Improved productivity CDK’s programming language–based approach and higher-level abstractions make it more productive for developers to define, manage, and update IaC. CDK’s rich ecosystem of libraries and community-contributed constructs also provides a wide range of pre-built components that can be easily reused, further accelerating development and reducing duplication of efforts. Seamless integration
CDK seamlessly integrates with popular development tools and practices, such as IDEs, source code repositories, CI/CD pipelines, and AWS CloudFormation. This allows for a smooth and efficient workflow, enabling developers to easily integrate infrastructure changes into their existing development processes and workflows. Full AWS service coverage CDK provides comprehensive coverage of AWS services, allowing developers to define and manage a wide range of cloud resources using the same programming language and constructs. This makes it a unified and consistent way to define infrastructure across different AWS services, reducing the need to switch between different tools or configurations. Flexibility and portability CDK allows developers to define infrastructure using programming languages, which provides flexibility and portability. CDK code can be easily reused across different AWS accounts, regions, or projects and can also be deployed to multiple cloud environments, making it a versatile choice for multicloud or hybrid cloud scenarios.
Like you, we came to CDK a little unsure of what we were getting into. We were familiar with other tools such as Ansible, CloudFormation, Terraform, and even the occasional shell script for orchestration. But CDK quickly won us over because it made building cloud infrastructure much more similar to writing object-oriented application code. At AWS, there is less of a divide between “platform” and “application” teams, which we find tends to result in tighter integration between the software and the infrastructure. This has a lot of benefits including more reliable, secure, and cost-effective applications. We are passionate about teaching others the benefits of CDK and how to use it. On a personal level, we love CDK for some additional reasons: Building with CDK is fun Honestly—writing code still feels like magic, and orchestrating cloud services from a code editor feels like being a magician. We still can’t get over how fun it is to go from idea or business challenge to cloud native solution in an afternoon or a week or a month by writing CDK. Just wait till you get your first taste in Chapters 1 and 2. CDK is open source and you can contribute to it
We love that CDK is open source and that you can contribute documentation, improvements, or even brand- new constructs. We have contributed several constructs to the public CDK libraries and to additional private libraries, and we have built several open source solutions for customers using CDK. CDK allows you to benefit from the flexibility and reusability of an object-oriented programming language We covered this earlier, but it’s worth reiterating on a personal level. It. Is. So. Awesome. To define, instantiate, and extend classes rather than copying and pasting declarative syntax. Writing CDK in object-oriented programming languages makes development quicker, and less prone to error, and is quite honestly more elegant, fun, concise, and effective. Just wait till you try it out. We think you won’t want to go back. CDK makes collaboration easier We have seen a lot of customers struggle with a siloed infrastructure development process, constantly reinventing the wheel, and experiencing difficulty maintaining consistent infrastructure operations. It’s very difficult to reuse declarative syntax in CloudFormation of
Terraform templates, which often leads to a centralized and slow process of cloud adoption. CDK makes this a lot easier because teams can maintain central construct libraries that can be used as packages and maintained centrally while developers use them for their own projects. We have seen this accelerate development velocity while also improving security, financial operations, and cloud operations. CDK lets software developers also own/understand infrastructure Because CDK combines application logic with infrastructure, CDK helps reduce the need to silo infrastructure into ticketing systems that divide IT and Application teams. We have seen, and experienced, the power of CDK to let developers own and/or understand infrastructure, which often improves overall reliability, helps optimize cost, and contributes to greater agility in the development cycle. If you weren’t convinced that CDK is worth your time before reading this section, we hope you are now. We are confident that by the time you finish Chapters 1 and 2 and you’ve built your first two projects, you will be proudly flying the CDK flag. Are there CDK flags? Maybe there should be. Now that we have
expressed our love and appreciation for CDK, we will further explain why we wrote this book and why we think you should keep on reading it. Why We Wrote This Book This is the book we wish had existed when we started learning CDK. We came together around the idea for this book because we wanted to build real projects in a context that was engaging and informative, and we wanted to feel well prepared to build real production cloud applications using CDK. Since such a book didn’t exist, we decided to write it for you. We know that time efficiency is important when you’re building a new technology. This book is meant to be a one-stop guide to learn the what, why, and how of CDK and build real projects that you can show or share as a digital portfolio.
Who This Book Is For This book is for developers, students, hobbyists, and the cloud- curious. This book is for people who have tried AWS CloudFormation, Terraform, Ansible, and many other tools but wanted something more like object-oriented programming and less declarative. This book is for teams looking to adopt CDK. If you made it this far, this book is for you. How to Use This Book The book is a tool for you to use in the ways that best suit your needs. Here are some options for how you might use the book, but you get to decide how you use it: Read this book sequentially from cover to cover. Read this book as a reference text, consulting specific chapters as you need them. Read this book as a free-for-all, picking random chapters and following along with projects as you go. We want this book to serve as a useful reference even after you have completed the projects. Our goal is for you to learn how CDK works, not to memorize specific recipes that produce
standard outcomes. You can look those up as needed. If we were picking up the text for the first time, we would get comfortable with a computer to work on, a favorite beverage, and a quiet place. We would probably complete a chapter and corresponding project each in a single sitting, until we had built our own portfolio project. After reading once, we would return to the text as a reference when building personal and work projects. We might recommend specific chapters to a curious friend and lend the book to them, always sure to get it back to lend to the next person. Why Projects First? You might find that this book is structured a little differently from your traditional technical guide or text. We put the projects at the very beginning of each chapter so that you can get “hands-on” first (as the title suggests). This means that some project sections may have you asking yourself, “Why am I doing this?”; “What does this even mean?”; and “Can you give me the theory and concepts, please?” We wrote the book this way for three reasons: We talked with a lot of our target audience and they told us that they often just skip ahead to projects anyway.