github actionsとAWSとの連携

configure-aws-credentialsを使用してassume roleでgithub側に権限を渡します。
具体的にはrole_to_assumeにIAM Roleのarnを渡します。
GitHub - aws-actions/configure-aws-credentials: Configure AWS credential environment variables for use in other GitHub Actions.
permissionsの追記を忘れずに

# These permissions are needed to interact with GitHub's OIDC Token endpoint.
    permissions:
      id-token: write
      contents: read

また事前にAWS側でIAM Roleを作っておく必要があります。
信頼関係(誰がこのRoleを引き受けられるのか)を指定する必要があり、今回のケースではgithub上の特定のリポジトリだけが引き受けられるようにします。必要ならブランチまで指定可能です(多分)。
書き方のサンプルはこちら
Configuring OpenID Connect in Amazon Web Services - GitHub Docs

"OpenIDConnect provider’s HTTPS certificate doesn’t match configured thumbprint"というエラーが出る場合

サムプリント値を更新する必要があります。
更新の仕方についてはこちら
GitHub ActionsとAWSのOIDC連携によるAssume Roleが”OpenIDConnect provider’s HTTPS certificate doesn’t match configured thumbprint”エラーとなる | DevelopersIO
更新するサムプリント値についてはこちら(現時点)
GitHub Actions – Update on OIDC integration with AWS | GitHub Changelog