update to aws-cli v2 to use eks iam serviceaccount oidc roles #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Switches to v2 of awscli to properly support IAM roles assumed by a kubernetes service account (a web identity token assumed by an OIDC connector). V1 of the awscli does not support web identity tokens or the
AWS_WEB_IDENTITY_TOKEN_FILE
environment variable, leading to the cli using the EKS node role instead of the role provided by the service account. V2 also providesecr get-login-password
, which replacesecr get-login --no-include-email | awk '{print $6}'
.No native alpine or pip support/packages are provided for the awscli, so the package must be downloaded directly from AWS, and installed alongside with the appropriate c libraries to ensure proper function.
Tested & running on EKS 1.21 with an OIDC service account IAM role.