Resources for S3

Courses

We will use the AWS CDK in Typescript to create a Lambda function and its resources, and schedule it at specific intervals. We will use this lambda to perform regular database backups of a server outside of AWS.

Episodes

We explain how the project will be structured and what we are trying to accomplish: a cron process running on AWS Lambda to backup an external server.

• AWS Lambda
• AWS Cloudformation
• AWS CDK
• AWS S3
We will run cdk init to start a Typescript project.

• Updating our Makefile to document the setup commands
• Creating a folder with the stack, service, and dependencies
• Install missing aws and system dependencies as we need them
We start by defining a new s3 bucket we want to create.
We will deploy our resources with cdk deploy. Once we are done we will use cdk destroy to remove the resources.

• Updating our Makefile to document the changes.
• Confirm the s3 bucket is created.
• Deal with common pitfalls when running cdk destroy — like s3 resoruces not being removed.
• Install autodelete bucket and missing aws dependencies.
• Makefile .PHONY targets.
• Permissions.

We will allocate and deallocate aws resources using cdk deploy and cdk destroy, and deal with some common problems we can run into.

Short Videos

A step by step example of how to create an s3 bucket that autodeletes when we run cdk destroy, using Typescript