Triggering AWS codepipeline/codebuild from a scheduled lambda and blocking commit trigger

Viewed 2957

I have a codepipeline using AWS codebuild building an AMI I planning on running on a weekly schedule for a fresh server image.

  1. I want to run it as a scheduled task, I thought of using lambda scheduled tasks for that, but didn't see an option of running pipeline source from lambda (I thought of using the api from lambda for that, but I rather have a mode declarative solution using the existing tools) Does anyone know of a built in solution for that?

  2. I DON'T want it to run on code push, how can that be enabled?

Edit: clarification

Why codepipeline? Because the task is too long for lambda. And I don't want to spin an ec2 instance for that (Billed by the hour) or keep an almost not working instance. Any other AWS tools that can handle that?

3 Answers

Currently, these are the Codepipeline detection options when using Codecommit enter image description here

Even though this configures the CloudWatch Events to automatically start when a change occurs, you can just log into the Cloudwatch console and disable or modify the event as you like.

Since the events can run on a schedule, you may not even need lambda

Related