Authentication establishes that an identity is valid; authorization determines what it may do. In AWS, an identity and access management role supplies that authorization to an identity provided by an external OpenID Connect identity provider. section 8.5.1
A secure role configuration should:
- Trust the intended identity provider, such as GitHub Actions or Spacelift. section 8.5.1
- Restrict assumption with conditions covering the specific repository, workflow, or Spacelift stack. section 8.5.1
- Grant only the permissions required by the deployment workload. section 8.5.1
GitHub Actions assuming an AWS role
A workflow requests an OIDC token, checks out the repository, and uses aws-actions/configure-aws-credentials with a role ARN and AWS region. The role's trust policy must limit assumption to the intended repository and workflows. section 8.5.1
