Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to connect OpenShift Pipelines using AWS CodeCommit

November 13, 2023
Nirjhar Jajodia Savita Ashture
Related topics:
Automation and managementKubernetes
Related products:
Red Hat OpenShift

Share:

    In today's fast-paced software development landscape, pipelines have become essential for organizations to streamline their development processes. Tekton, an open source framework for building pipelines, offers a flexible and scalable solution. This article will explore how to create an efficient and automated workflow by integrating Tekton (Red Hat OpenShift Pipelines) with AWS CodeCommit, a fully managed source control service by Amazon Web Services (AWS).

    Integrating Trigger with AWS CodeCommit brings together the benefits of a flexible pipeline framework and a managed source control service. This integration enables organizations to create an efficient and automated workflow, encompassing code changes, building, testing, and deploying applications. To enable the AWS CodeCommit webhook to trigger a Tekton pipeline in Red Hat OpenShift, you must configure several resources, including Tekton TriggerTemplate, EventListener, and TriggerBinding objects.

    Refer to the OpenShift Pipelines documentation for more information. This article describes the steps to connect AWS CodeCommit with the OpenShift Pipelines and use it as source code management (SCM) for CI\CD.

    Prerequisites

    1. OpenShift cluster and AWS account to use AWS CodeCommit and SNS service.
    2. To setup, follow OpenShift Pipelines (OSP) for OpenShift and Tekton Pipelines and Tekton Triggers for Kubernetes.
    3. Make sure all workloads are up and running.

    Steps to connect AWS CodeCommit

    1. Enable debug logs for Triggers eventlistener to obtain the subscription URL, which we will explain in a later section of this article. Debug logging will help us to see the event listener detailed logging information.

    2. Create samples for TriggerTemplate, TriggerBinding, and EventListener and expose event listener service, which will help to configure in AWS CodeCommit trigger.

    You can review samples on GitHub.

    oc create -f https://gist.githubusercontent.com/savitaashture/097c366753ea58017e8a24be83892ad4/raw/a441f65afe73113dd554122c8e86818af030b7da/gistfile1.txt

    3. Sign in to your AWS account and navigate to your chosen region.

    4. Look for the CodeCommit AWS service in the search bar to locate and access the repository hosting and version control solution swiftly.

    5. Navigate to the left side of the panel and choose Source -> Repositories -> Create Repository to initiate the repository creation process (Figure 1).

    A screenshot of the create repository page in AWS CodeCommit.
    Figure 1: Create a repository in AWS CodeCommit.

    Adding triggers

    After successfully creating the repository, proceed with the following steps to add triggers:

    1. Create a Simple Notification Service (SNS) as shown in Figure 2.

    2. Search for SNS service.

    A screenshot of creating an SNS topic in AWS code commit.
    Figure 2: Creating an SNS topic.

    3. Click on Create topic (Figure 3).

    A screenshot of creating an SNS topic.
    Figure 3: Creating an SNS topic.

    4. Click on Create Subscription (Figure 4).

    A screenshot of the first part of creating a subscription in AWS code commit.
    Figure 4: First part of creating a subscription.

    5. Ensure that you enable raw message delivery by checking the appropriate box (Figure 5).

    A screenshot of the second part of creating a subscription in AWS code commit.
    Figure 5: The second part of creating a subscription.

    6. Once you have successfully created a subscription, click on Request confirmation (Figure 6).

    A screenshot of the highlighted request confirmation subscription button.
    Figure 6: Requesting confirmation subscription.

    7. Then go to the event listener pod:

    oc logs -f <pod-name>

    8. Search for SubscribeURL and copy value.

    Example:

    "SubscribeURL\" : \"https://sns.us-east-2.amazonaws.com/?Action=ConfirmSubscription&TopicArn=arn:aws:sns:us-east-2:361754793035:demo-acc-tekton&Token=2336412f37fb687f5d51e6e2425c464de257e9a5924e2fd4cf343ac0f1dcdb40cc7dad021f86dcf2af98fbabf59b6314b975e5d5bfc673924522ab99cb9b45b824a2795d81328e045db0148571c0ba451648f60157690c2c377eb41f58a7d663c15a36654beda27c295f9f90cc8a0f46096aea96a40f9c4ca0b1ec1092e32116\"

    9. Click on Confirm subscription (Figure 7).

    A screenshot of the confirm subscription button in AWS code commit.
    Figure 7: Click the Confirm Subscription button.

    10. Make sure the status is confirmed (Figure 8).

    A screenshot of confirmed status notification in AWS Code Commit.
    Figure 8: Status confirmed.

    11. Now go back to CodeCommit page.

    12. Go to Source -> Repositories and select demo-acc-tekton (Figure 9).

    A screenshot of create repository after all the changes in AWS Code Commit.
    Figure 9: Create a repository after all the changes.

    13. Go to Settings -> Triggers, then click on Create trigger (Figure 10).

    A screenshot of creating trigger in AWS Code Commit.
    Figure 10: Creating a trigger in AWS Code Commit.

    14. While creating the trigger, give the trigger name. Set the events to: All repository events Service to use AWS SNS. Choose the previously configured SNS topic (Figure 11).

    A screenshot of the trigger details page in AWS.
    Figure 11: Trigger details page.

    15. Once the Create trigger is successful, go back to the AWS CodeCommit repository and send a push request. You should see a new Taskrun created.

    kubectl get taskruns | grep aws-codecommit-push-listener-run-

    Important note

    Users can get the request body data coming from AWS Code Commit from the EventListener pod as we have enabled debug log initially. So all request body will be displayed as payload.

    Sample payload for push request:

    {"level":"debug","ts":"2023-07-29T18:49:13.904Z","logger":"eventlistener","caller":"sink/sink.go:177", "msg":"handling event with path /, payload: {\"Records\":[{\"awsRegion\":\"us-e
    ast-2\",\"codecommit\":{\"references\":[{\"commit\":\"b660b4bbf35e6d18478063a01dbcaa0f94edef6e\",\"ref\":\"refs/heads/main\"}]},\"customData\":null,\"eventId\":\"9d769236-ad9b-48ea-
    84e0-bd1b93378560\",\"eventName\":\"ReferenceChanges\",\"eventPartNumber\":1,\"eventSource\":\"aws:codecommit\",\"eventSourceARN\":\"arn:aws:codecommit:us-east-2:361754793035: demo-a
    cc-tekton\",\"eventTime\":\"2023-07-29T18:49:13.816+0000\",\"eventTotalParts\":1,\"eventTriggerConfigId\":\"34d16103-b8a5-48cd-b16a-cbd287a724c8\",\"eventTriggerName\":\"demo-acc-te
    kton\",\"eventVersion\":\"1.0\",\"userIdentityARN\":\"arn:aws:iam: :361754793035:user/njajodia@redhat.com-v7nxk-admin\"}]} and header: map [Accept-Encoding: [gzip,deflate] Content-Leng

    Summary

    In this article, we explored integrating Tekton (OpenShift Pipelines) with AWS CodeCommit. Integrating Tekton with AWS CodeCommit brings together the benefits of a flexible pipeline framework and a managed source control service. This integration enables organizations to create an efficient and automated workflow, encompassing code changes, building, testing, and deploying applications. We demonstrated how to enable the AWS CodeCommit to trigger a Tekton pipeline in OpenShift and configured several resources, including TriggerTemplate, EventListener, and TriggerBinding objects along with SNS topic in AWS.

    Related Posts

    • 5 principles for deploying your API from a CI/CD pipeline

    • Build a Go application using OpenShift Pipelines

    • Red Hat Open Innovation Labs: Automating CI/CD Deployment Pipelines

    • How to create an EC2 instance in AWS using Ansible workflow

    Recent Posts

    • What qualifies for Red Hat Developer Subscription for Teams?

    • How to run OpenAI's gpt-oss models locally with RamaLama

    • Using DNS over TLS in OpenShift to secure communications

    • Scaling DeepSeek and Sparse MoE models in vLLM with llm-d

    • Multicluster authentication with Ansible Automation Platform

    What’s up next?

    The automated builds and deployments (CI/CD) of container-based applications can reduce mistakes, improve productivity, and promote more thorough testing. Try this sandbox activity to learn about OpenShift Pipelines for automated builds and deployment.

    Start learning
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue