This pattern implements the solution outlined at https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automate-event-driven-backups-from-codecommit-to-amazon-s3-using-codebuild-and-cloudwatch-events.html.
It uses a Lambda function and a CloudFormation Custom Resource to create the CodeBuild buildspec.yml template at deployment time, and the EventBridge and CodeBuild project described on the AWS Prescriptive Guidance.