GitHub OIDC
Part of Setup your AWS environment.
Set up GitHub OIDC to let GitHub Actions assume AWS roles for CI/CD without long-lived credentials. Configured via the iam package.
Step 1: Add and configure the iam package
In package-config.yml, enable GithubIdentityProvider:
Only one per account
You can only have one GithubIdentityProvider enabled per account. If already enabled in a different environment, you cannot enable it here.
Enabling it will cause an error when applying the stack.
Step 2: Install and apply the package
Step 3: Verify
Output should contain a provider with token.actions.githubusercontent.com in the ARN.
Sign in to the AWS console and navigate to IAM. Select Identity Providers.
List should contain provider token.actions.githubusercontent.com.
You're done with CI/CD for IaC. We'll revisit CI/CD after setting up the application.
Next step
Set up application common.