-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Malformed response when requesting EKS token from gov-cloud (affects >=2.10.4
)
#7719
Comments
It seems that after 2.10.3 awscli relies on configured output format. Before it was json despite configured format:
(i have configured as a workaround you can set AWS_DEFAULT_OUTPUT env variable ( to json:
You can embed this variable by editing kubeconfig file. |
This issue should be fixed via the PR linked above (#7726). Those changes will be available in the next CLI release. |
|
Correct me if I'm wrong, but this would not fix the issue for current users (unless they (re)generated |
As i see from PR description, it just restores previous behaviour (before 2.10.4), so it should work out of the box. |
Maybe I'm just misreading it. I can always re-open after release if it still happens. Thanks! |
The fixed version for v1 will be out today and for v2 tomorrow. You will need to regenerate the config with |
I'm not sure this is a complete fix then. New (greenfield) users would be covered, but anyone would else would still have this issue. Since the error message doesn't give any hints on cause they would have to search around, find this issue, and then apply fixes themselves. Unless I'm misunderstanding something. I would classify this as still open. Suggestion: Ignore user-set formatting variables when not in an interactive tty? |
I'm not sure about that but recommend leaving feedback on that recent PR (#7726) to get visibility on your concerns from those who have directly been working on this. I can reference your most recent comment there. |
The fix involves (1) getting the format from the flag The behaviour before 2.10.4 was to use a default Yes the config file needs to be re-generated to add the flag |
I still feel like this would leave most users out (given kubeconfig files are not touched frequently), but maybe adding something to the release notes about needing regeneration would be enough? |
…k/lambda-layer-awscli (#24590) Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.84 to 1.27.89. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst">awscli's changelog</a>.</em></p> <blockquote> <h1>1.27.89</h1> <ul> <li>api-change:<code>ivschat</code>: This release adds a new exception returned when calling AWS IVS chat UpdateLoggingConfiguration. Now UpdateLoggingConfiguration can return ConflictException when invalid updates are made in sequence to Logging Configurations.</li> <li>api-change:<code>secretsmanager</code>: The type definitions of SecretString and SecretBinary now have a minimum length of 1 in the model to match the exception thrown when you pass in empty values.</li> </ul> <h1>1.27.88</h1> <ul> <li>api-change:<code>codeartifact</code>: This release introduces the generic package format, a mechanism for storing arbitrary binary assets. It also adds a new API, PublishPackageVersion, to allow for publishing generic packages.</li> <li>api-change:<code>connect</code>: This release adds a new API, GetMetricDataV2, which returns metric data for Amazon Connect.</li> <li>api-change:<code>evidently</code>: Updated entity override documentation</li> <li>api-change:<code>networkmanager</code>: This update provides example usage for TransitGatewayRouteTableArn.</li> <li>api-change:<code>quicksight</code>: This release has two changes: add state persistence feature for embedded dashboard and console in GenerateEmbedUrlForRegisteredUser API; add properties for hidden collapsed row dimensions in PivotTableOptions.</li> <li>api-change:<code>redshift-data</code>: Added support for Redshift Serverless workgroup-arn wherever the WorkgroupName parameter is available.</li> <li>api-change:<code>sagemaker</code>: Amazon SageMaker Inference now allows SSM access to customer's model container by setting the "EnableSSMAccess" parameter for a ProductionVariant in CreateEndpointConfig API.</li> <li>api-change:<code>servicediscovery</code>: Updated all AWS Cloud Map APIs to provide consistent throttling exception (RequestLimitExceeded)</li> <li>api-change:<code>sesv2</code>: This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects missing or misconfigured Brand Indicator for Message Identification (BIMI) DNS records for customer sending identities.</li> </ul> <h1>1.27.87</h1> <ul> <li>api-change:<code>athena</code>: A new field SubstatementType is added to GetQueryExecution API, so customers have an error free way to detect the query type and interpret the result.</li> <li>api-change:<code>dynamodb</code>: Adds deletion protection support to DynamoDB tables. Tables with deletion protection enabled cannot be deleted. Deletion protection is disabled by default, can be enabled via the CreateTable or UpdateTable APIs, and is visible in TableDescription. This setting is not replicated for Global Tables.</li> <li>api-change:<code>ec2</code>: Introducing Amazon EC2 C7g, M7g and R7g instances, powered by the latest generation AWS Graviton3 processors and deliver up to 25% better performance over Graviton2-based instances.</li> <li>api-change:<code>lakeformation</code>: This release adds two new API support "GetDataCellsFiler" and "UpdateDataCellsFilter", and also updates the corresponding documentation.</li> <li>api-change:<code>mediapackage-vod</code>: This release provides the date and time VOD resources were created.</li> <li>api-change:<code>mediapackage</code>: This release provides the date and time live resources were created.</li> <li>api-change:<code>route53resolver</code>: Add dual-stack and IPv6 support for Route 53 Resolver Endpoint,Add IPv6 target IP in Route 53 Resolver Forwarding Rule</li> <li>api-change:<code>sagemaker</code>: There needs to be a user identity to specify the SageMaker user who perform each action regarding the entity. However, these is a not a unified concept of user identity across SageMaker service that could be used today.</li> </ul> <h1>1.27.86</h1> <ul> <li>bugfix:eks: Output JSON only for user entry in kubeconfig fixes <code>[#7719](aws/aws-cli#7719) <https://github.com/aws/aws-cli/issues/7719></code><strong>, fixes <code>[#7723](aws/aws-cli#7723) <https://github.com/aws/aws-cli/issues/7723></code></strong>, fixes <code>[#7724](aws/aws-cli#7724) <https://github.com/aws/aws-cli/issues/7724></code>__</li> <li>api-change:<code>dms</code>: This release adds DMS Fleet Advisor Target Recommendation APIs and exposes functionality for DMS Fleet Advisor. It adds functionality to start Target Recommendation calculation.</li> <li>api-change:<code>location</code>: Documentation update for the release of 3 additional map styles for use with Open Data Maps: Open Data Standard Dark, Open Data Visualization Light & Open Data Visualization Dark.</li> </ul> <h1>1.27.85</h1> <ul> <li>api-change:<code>account</code>: AWS Account alternate contact email addresses can now have a length of 254 characters and contain the character "|".</li> <li>api-change:<code>ivs</code>: Updated text description in DeleteChannel, Stream, and StreamSummary.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-cli/commit/df68d39f402e023dd0ee48e6974eda850b4bbb21"><code>df68d39</code></a> Merge branch 'release-1.27.89'</li> <li><a href="https://github.com/aws/aws-cli/commit/be4afd12701baadf08a343553b99975a2c02b7a0"><code>be4afd1</code></a> Bumping version to 1.27.89</li> <li><a href="https://github.com/aws/aws-cli/commit/9583dc5226fdd93d752bcf319736af7c42602963"><code>9583dc5</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/7808d95fb9d1d99e0e0088132296e96d99a6a958"><code>7808d95</code></a> Merge branch 'release-1.27.88'</li> <li><a href="https://github.com/aws/aws-cli/commit/7e4d04f4e522737ba951995886fe58e33a410ca3"><code>7e4d04f</code></a> Merge branch 'release-1.27.88' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/7b64318189b3a3f2369885122b3249a961930b62"><code>7b64318</code></a> Bumping version to 1.27.88</li> <li><a href="https://github.com/aws/aws-cli/commit/1c8486baccbfe705230ccf87850f8dfe5aba7ff3"><code>1c8486b</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/b40f487fa9a27ccf00e93e480bd7f73419d5f66a"><code>b40f487</code></a> Merge branch 'release-1.27.87'</li> <li><a href="https://github.com/aws/aws-cli/commit/19b76b4b57f86ed4b6341a353d56cacf4f3582fd"><code>19b76b4</code></a> Merge branch 'release-1.27.87' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/753b87077b1a8d21082cf2de1e48e9f4eec22352"><code>753b870</code></a> Bumping version to 1.27.87</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.84...1.27.89">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.27.84&new-version=1.27.89)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.84 to 1.27.89. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst">awscli's changelog</a>.</em></p> <blockquote> <h1>1.27.89</h1> <ul> <li>api-change:<code>ivschat</code>: This release adds a new exception returned when calling AWS IVS chat UpdateLoggingConfiguration. Now UpdateLoggingConfiguration can return ConflictException when invalid updates are made in sequence to Logging Configurations.</li> <li>api-change:<code>secretsmanager</code>: The type definitions of SecretString and SecretBinary now have a minimum length of 1 in the model to match the exception thrown when you pass in empty values.</li> </ul> <h1>1.27.88</h1> <ul> <li>api-change:<code>codeartifact</code>: This release introduces the generic package format, a mechanism for storing arbitrary binary assets. It also adds a new API, PublishPackageVersion, to allow for publishing generic packages.</li> <li>api-change:<code>connect</code>: This release adds a new API, GetMetricDataV2, which returns metric data for Amazon Connect.</li> <li>api-change:<code>evidently</code>: Updated entity override documentation</li> <li>api-change:<code>networkmanager</code>: This update provides example usage for TransitGatewayRouteTableArn.</li> <li>api-change:<code>quicksight</code>: This release has two changes: add state persistence feature for embedded dashboard and console in GenerateEmbedUrlForRegisteredUser API; add properties for hidden collapsed row dimensions in PivotTableOptions.</li> <li>api-change:<code>redshift-data</code>: Added support for Redshift Serverless workgroup-arn wherever the WorkgroupName parameter is available.</li> <li>api-change:<code>sagemaker</code>: Amazon SageMaker Inference now allows SSM access to customer's model container by setting the "EnableSSMAccess" parameter for a ProductionVariant in CreateEndpointConfig API.</li> <li>api-change:<code>servicediscovery</code>: Updated all AWS Cloud Map APIs to provide consistent throttling exception (RequestLimitExceeded)</li> <li>api-change:<code>sesv2</code>: This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects missing or misconfigured Brand Indicator for Message Identification (BIMI) DNS records for customer sending identities.</li> </ul> <h1>1.27.87</h1> <ul> <li>api-change:<code>athena</code>: A new field SubstatementType is added to GetQueryExecution API, so customers have an error free way to detect the query type and interpret the result.</li> <li>api-change:<code>dynamodb</code>: Adds deletion protection support to DynamoDB tables. Tables with deletion protection enabled cannot be deleted. Deletion protection is disabled by default, can be enabled via the CreateTable or UpdateTable APIs, and is visible in TableDescription. This setting is not replicated for Global Tables.</li> <li>api-change:<code>ec2</code>: Introducing Amazon EC2 C7g, M7g and R7g instances, powered by the latest generation AWS Graviton3 processors and deliver up to 25% better performance over Graviton2-based instances.</li> <li>api-change:<code>lakeformation</code>: This release adds two new API support "GetDataCellsFiler" and "UpdateDataCellsFilter", and also updates the corresponding documentation.</li> <li>api-change:<code>mediapackage-vod</code>: This release provides the date and time VOD resources were created.</li> <li>api-change:<code>mediapackage</code>: This release provides the date and time live resources were created.</li> <li>api-change:<code>route53resolver</code>: Add dual-stack and IPv6 support for Route 53 Resolver Endpoint,Add IPv6 target IP in Route 53 Resolver Forwarding Rule</li> <li>api-change:<code>sagemaker</code>: There needs to be a user identity to specify the SageMaker user who perform each action regarding the entity. However, these is a not a unified concept of user identity across SageMaker service that could be used today.</li> </ul> <h1>1.27.86</h1> <ul> <li>bugfix:eks: Output JSON only for user entry in kubeconfig fixes <code>[#7719](aws/aws-cli#7719) <https://github.com/aws/aws-cli/issues/7719></code><strong>, fixes <code>[#7723](aws/aws-cli#7723) <https://github.com/aws/aws-cli/issues/7723></code></strong>, fixes <code>[#7724](aws/aws-cli#7724) <https://github.com/aws/aws-cli/issues/7724></code>__</li> <li>api-change:<code>dms</code>: This release adds DMS Fleet Advisor Target Recommendation APIs and exposes functionality for DMS Fleet Advisor. It adds functionality to start Target Recommendation calculation.</li> <li>api-change:<code>location</code>: Documentation update for the release of 3 additional map styles for use with Open Data Maps: Open Data Standard Dark, Open Data Visualization Light & Open Data Visualization Dark.</li> </ul> <h1>1.27.85</h1> <ul> <li>api-change:<code>account</code>: AWS Account alternate contact email addresses can now have a length of 254 characters and contain the character "|".</li> <li>api-change:<code>ivs</code>: Updated text description in DeleteChannel, Stream, and StreamSummary.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-cli/commit/df68d39f402e023dd0ee48e6974eda850b4bbb21"><code>df68d39</code></a> Merge branch 'release-1.27.89'</li> <li><a href="https://github.com/aws/aws-cli/commit/be4afd12701baadf08a343553b99975a2c02b7a0"><code>be4afd1</code></a> Bumping version to 1.27.89</li> <li><a href="https://github.com/aws/aws-cli/commit/9583dc5226fdd93d752bcf319736af7c42602963"><code>9583dc5</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/7808d95fb9d1d99e0e0088132296e96d99a6a958"><code>7808d95</code></a> Merge branch 'release-1.27.88'</li> <li><a href="https://github.com/aws/aws-cli/commit/7e4d04f4e522737ba951995886fe58e33a410ca3"><code>7e4d04f</code></a> Merge branch 'release-1.27.88' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/7b64318189b3a3f2369885122b3249a961930b62"><code>7b64318</code></a> Bumping version to 1.27.88</li> <li><a href="https://github.com/aws/aws-cli/commit/1c8486baccbfe705230ccf87850f8dfe5aba7ff3"><code>1c8486b</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/b40f487fa9a27ccf00e93e480bd7f73419d5f66a"><code>b40f487</code></a> Merge branch 'release-1.27.87'</li> <li><a href="https://github.com/aws/aws-cli/commit/19b76b4b57f86ed4b6341a353d56cacf4f3582fd"><code>19b76b4</code></a> Merge branch 'release-1.27.87' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/753b87077b1a8d21082cf2de1e48e9f4eec22352"><code>753b870</code></a> Bumping version to 1.27.87</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.84...1.27.89">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.27.84&new-version=1.27.89)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Describe the bug
After updating to cli v
2.10.4
(and continuing in2.11.0
) we get the following response from our clusters running in Gov-Cloudkubectl get pods Unable to connect to the server: getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal array into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
We get the same response from every
kubectl
request.Narrowed the problem down to the authentication step callout to
aws eks get-token
. With debug logs on, error occurs after the following lines:A few key details:
us-gov-west-1
eksctl
aws sso
for account auth and token generationConfirmed a few things:
aws
oraws-iam-authenticator
2.10.3
I can't seem to get any more debug logs so I can't dig further, but feels like a malformed response somewhere? Naked
aws eks get-token
seems to return expected results.Expected Behavior
kubectl
command returns dataCurrent Behavior
kubectl get pods Unable to connect to the server: getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal array into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
Happens for all subcommands checked (that interact with the server)
Reproduction Steps
Needs:
Doesn't work:
asdf shell awscli 2.10.4/2.11.0/latest kubectl X Unable to connect to the server: getting credentials: decoding stdout: couldn't get version/kind; json parse error: json: cannot unmarshal array into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
Does work:
Possible Solution
Smells like a malformed HTML response is trying to get unmarshalled (just to my 👃 )
Downgrading to
2.10.3
or earlier is a viable workaround for nowAdditional Information/Context
AWS SSO connected to Azure AD IdP
CLI version used
2.10.4+
Environment details (OS name and version, etc.)
macOS 13.2.1, kubectl and awscli via homebrew
The text was updated successfully, but these errors were encountered: