GitHub Actions Pipeline using OpenIDConnect in AWS Cloud

Step by step approach for creation of IAM Role in AWS and using in GitHub Actions Pipeline

Step1 : Create of Identity Provider for Github

Step2: Select the OpenIDConnect then give the necessary details as given below and then click on Add Provider


This content originally appeared on DEV Community and was authored by Srinivasulu Paranduru

Step by step approach for creation of IAM Role in AWS and using in GitHub Actions Pipeline

Step1 : Create of Identity Provider for Github

Image description

Step2: Select the OpenIDConnect then give the necessary details as given below and then click on Add Provider

Image description

Step3: Creation of IAM Role using Open ID Connector

Step 3.1:

Image description

Step 3.2:

  • Select Identity Provider
  • Select Audience
  • Enter GitHub Organisation

Image description

Step 3.3: Select required permissions

Image description

Step 3.4: Enter the role name as GHOIDCRole then click on create role

Image description

Step 3.5: Keep the IAM Role handy and its needs to be included to be used in GitHub Pipeline

  • arn:aws:iam::AWS_Account_ID:role/GHOIDCRole

Step 4: Create a github repo under your Github organisation

Image description

Step 4.1 : click on Actions

Image description

Step 4.2 :

To create a GitHub action to invoke the AWS CLI:
Create a basic workflow file, such as main.yml, in the .github/workflows directory of your repository. This sample workflow will assume the GHOIDCRole role, to perform the action aws sts get-caller-identity. Your repository can have multiple workflows, each performing different sets of tasks. After GitHub is authenticated to the role with the workflow, you can use AWS CLI commands in your account.
Paste the following example workflow into the file.


# This is a basic workflow to help you get started with Actions
name:Connect to an AWS role from a GitHub repository

# Controls when the action will run. Invokes the workflow on push events but only for the main branch
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:

  AWS_REGION : <"us-east-1"> #Change to reflect your Region

# Permission can be added at job level or


This content originally appeared on DEV Community and was authored by Srinivasulu Paranduru


Print Share Comment Cite Upload Translate Updates
APA

Srinivasulu Paranduru | Sciencx (2025-02-13T18:03:04+00:00) GitHub Actions Pipeline using OpenIDConnect in AWS Cloud. Retrieved from https://www.scien.cx/2025/02/13/github-actions-pipeline-using-openidconnect-in-aws-cloud/

MLA
" » GitHub Actions Pipeline using OpenIDConnect in AWS Cloud." Srinivasulu Paranduru | Sciencx - Thursday February 13, 2025, https://www.scien.cx/2025/02/13/github-actions-pipeline-using-openidconnect-in-aws-cloud/
HARVARD
Srinivasulu Paranduru | Sciencx Thursday February 13, 2025 » GitHub Actions Pipeline using OpenIDConnect in AWS Cloud., viewed ,<https://www.scien.cx/2025/02/13/github-actions-pipeline-using-openidconnect-in-aws-cloud/>
VANCOUVER
Srinivasulu Paranduru | Sciencx - » GitHub Actions Pipeline using OpenIDConnect in AWS Cloud. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/13/github-actions-pipeline-using-openidconnect-in-aws-cloud/
CHICAGO
" » GitHub Actions Pipeline using OpenIDConnect in AWS Cloud." Srinivasulu Paranduru | Sciencx - Accessed . https://www.scien.cx/2025/02/13/github-actions-pipeline-using-openidconnect-in-aws-cloud/
IEEE
" » GitHub Actions Pipeline using OpenIDConnect in AWS Cloud." Srinivasulu Paranduru | Sciencx [Online]. Available: https://www.scien.cx/2025/02/13/github-actions-pipeline-using-openidconnect-in-aws-cloud/. [Accessed: ]
rf:citation
» GitHub Actions Pipeline using OpenIDConnect in AWS Cloud | Srinivasulu Paranduru | Sciencx | https://www.scien.cx/2025/02/13/github-actions-pipeline-using-openidconnect-in-aws-cloud/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.