You will be able to find the code associated with this book in this GitHub repository: https://github.com/PacktPublishing/AWS-CDK-in-Practice.
This repository is organized into directories for each chapter. This code in this chapter can be found in this directory: https://github.com/PacktPublishing/AWS-CDK-in-Practice/tree/main/chapter-1-getting-started-with-iac-and-aws-cdk.
That said, converting the TypeScript code samples in this book into the programming language of your choice is relatively easy since the framework follows a set of common interface definitions. AWS has a handy guide for you: https://docs.aws.amazon.com/cdk/v2/guide/multiple_languages.html.
Do also note that to work with CDK, you will need an AWS account. You can sign up for one here: https://portal.aws.amazon.com/billing/signup.
For more advanced users, we recommend setting up a different AWS organization for working with CDK while you’re learning the ropes so that your development doesn’t interfere with applications that you might have already spun up in your account. You can find out more about AWS Organizations here: https://aws.amazon.com/organizations/.
We also highly recommend setting AWS billing alarms. We will keep things within the free tier of various services as much as we can in this book and will destroy stacks as soon as we’ve spun them up and interacted with them. But it’s best to be on the safe side and set a spending alarm in case mistakes happen or you forget to destroy stacks. A spending alarm of $10 should do the trick. The following link describes how you can do this: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html.
The Code in Action video for this chapter can be viewed at: https://packt.link/nX11h.