Frequency is not conditional it will trigger the build at the required frequency whether there are changes or not. Is there a particular reason not to build on every commit? It's usually better that a build fails sooner rather than later.
Using a phase within your build spec, for example, pre_build you could run git commands/script to determine if there have been any changes within the last hour. This could set a custom env var which you then use to conditionally wrap the build phase. Additionally, the env var CODEBUILD_RESOLVED_SOURCE_VERSION might allow you to determine if there have been any changes since last build.
Using the pre build phase to set env var that's a great idea, will give that a go. Thanks.
Codebuild - How to trigger a build from an outbound webhook from external system not (bitbucket, github, gitlab)asked 5 months ago
Build and Deploy source from git Tag from another accountAccepted Answerasked 9 months ago
How to Get CodeBuild to Build Develop NOT the PR Branch?
CodeBuild build trigger not checking if the source actually changed?Accepted Answerasked a year ago
Codebuild checkout of git modules fails with generic messageAccepted Answerasked 9 months ago
AWS Codepipeline is very slow(source to build stage)asked 4 years ago
CodeBuild Show Better Description in Source Version
Use same CodeBuild project for multiple GitHub repositoriesAccepted Answerasked a year ago
CodePipeline Source Action Fails with "[GitHub] InternalError"asked 6 months ago
Codebuild Fails Pulling Source when using CodePipeline Source Provider(GH Enterprise)asked 5 months ago