Course contentsShow
← Cloud and Infrastructure
Lesson 1840 of 2,98938. AWS Native CI/CDFree lesson

Source Stage Configuration

Configuring source providers including CodeCommit, S3, GitHub, and Bitbucket for pipeline triggers.

Source Stage Configuration

What you'll learn: How to configure the source stage of an AWS CodePipeline to automatically trigger builds from different code repositories.

What Is the Source Stage?

The source stage is the entry point of your CodePipeline—it's where your pipeline watches for changes in your code repository. Think of it as a doorbell: when code changes, it rings, and your pipeline springs into action. Without a properly configured source stage, your pipeline has nothing to build or deploy.

Supported Source Providers

AWS CodePipeline supports four main source providers:

AWS CodeCommit

Your native AWS Git repository. Configure it by specifying the repository name and branch. CodePipeline automatically detects commits and triggers the pipeline using CloudWatch Events.

Amazon S3

Monitors an S3 bucket for changes to a specific object (like a ZIP file). When the object is updated, the pipeline triggers. Useful for pre-packaged artifacts or legacy systems.

GitHub

Integrates with GitHub repositories using OAuth or GitHub App connections. You specify the repository owner, name, and branch. CodePipeline uses webhooks to detect pushes.

Bitbucket

Similar to GitHub integration, using Bitbucket Cloud repositories. Requires a connection through AWS CodeStar Connections for secure authentication.

Configuration Essentials

For each source provider, you'll define:

  • Source location (repository name, S3 bucket, etc.)
  • Branch or version to monitor
  • Authentication mechanism (IAM roles for CodeCommit/S3, OAuth/connections for GitHub/Bitbucket)
  • Output artifact name (the code bundle passed to subsequent stages)

The source stage packages your code into an artifact that later stages (build, deploy) consume.

Key Takeaway: The source stage connects your code repository to CodePipeline—choose the provider that matches where your code lives, configure authentication properly, and your pipeline will automatically trigger on every change.