-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws eks update-kubeconfig fails with error TypeError: 'NoneType' object is not iterable #4843
Comments
After deleting my existing ~/.kube/config file I ran the update-kubeconfig again and now it works perfectly fine. Perhaps it was an issue with my config's format or something ? Here's what it used to look like...
|
I've stumbled upon this again, and I'm going to speculate that the AWS CLI needs to be able to handle config files a little more robustly. Here's a couple of flows that I've come up with that causes this to fail.... Flow 1// Start with fresh file // Update with the context you want // Use KubeCtl to delete the context // RE-Apply the Config Tried to insert into contexts, which is a <type 'NoneType'> not a <type 'list'> Here is my context file before the Re-Apply
Flow 2// Start with fresh file // Update with the context you want // Use KubeCtl to delete the context // RE-Apply the Config 'NoneType' object is not iterable Config before re-apply
|
Apparently, the AWS CLI will need to take into account the changed behavior, see how the upstream kubernetes issue was closed: kubernetes/kubernetes#88524 |
thanks all, i had same issue, solved it with |
Thanks for the report and the detailed descriptions on how to get it to fail. I'll confer with the EKS team on how to handle this, as it is a CLI customization. |
Any update on this? |
The problem is that if you have only one definition of a cluster, context or user in the Then if you try to
Simple workaround for above cases is to replace all sed -i 's/: null/: []/g' ~/.kube/config && \
aws eks --region ${AWS_REGION} update-kubeconfig --name ${EKS_CLUSTER_NAME} |
Same to me, solved it with |
Thanks. This solved it for me too |
I ran into this issue on a Linux machine running Pop_OS. I had previously setup |
My colleague stumbled on this issue. |
Just ran into the same Issue - deleting the |
It seems to me that aws-cli should take into account having an older |
EDIT: nevermind, had a rogue
I don't have a
|
the problem is still happening... Is there any plans to fix this issue |
This happened when setting up an EKS cluster after using MiniKube. Removing the kube config works but seems like the AWS CLI should be more robust. |
I have just come across this issue. As @TechnicalMercenary temporary fix is by removing the .kube/config file and running the command again. However, AWS should consider fixing this issue. |
happened to me as well, removing |
|
…cdk/lambda-layer-awscli (#25012) Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.104 to 1.27.109. <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.109</h1> <ul> <li>api-change:<code>dlm</code>: Updated timestamp format for GetLifecyclePolicy API</li> <li>api-change:<code>docdb</code>: This release adds a new parameter 'DBClusterParameterGroupName' to 'RestoreDBClusterFromSnapshot' API to associate the name of the DB cluster parameter group while performing restore.</li> <li>api-change:<code>fsx</code>: Amazon FSx for Lustre now supports creating data repository associations on Persistent_1 and Scratch_2 file systems.</li> <li>api-change:<code>lambda</code>: This release adds a new Lambda InvokeWithResponseStream API to support streaming Lambda function responses. The release also adds a new InvokeMode parameter to Function Url APIs to control whether the response will be streamed or buffered.</li> <li>api-change:<code>quicksight</code>: This release has two changes: adding the OR condition to tag-based RLS rules in CreateDataSet and UpdateDataSet; adding RefreshSchedule and Incremental RefreshProperties operations for users to programmatically configure SPICE dataset ingestions.</li> <li>api-change:<code>redshift-data</code>: Update documentation of API descriptions as needed in support of temporary credentials with IAM identity.</li> <li>api-change:<code>servicecatalog</code>: Updates description for property</li> </ul> <h1>1.27.108</h1> <ul> <li>api-change:<code>cloudformation</code>: Including UPDATE_COMPLETE as a failed status for DeleteStack waiter.</li> <li>api-change:<code>greengrassv2</code>: Add support for SUCCEEDED value in coreDeviceExecutionStatus field. Documentation updates for Greengrass V2.</li> <li>api-change:<code>proton</code>: This release adds support for the AWS Proton service sync feature. Service sync enables managing an AWS Proton service (creating and updating instances) and all of it's corresponding service instances from a Git repository.</li> <li>api-change:<code>rds</code>: Adds and updates the SDK examples</li> </ul> <h1>1.27.107</h1> <ul> <li>bugfix:eks: Fix eks kubeconfig validations closes <code>[#6564](aws/aws-cli#6564) <https://github.com/aws/aws-cli/issues/6564></code><strong>, fixes <code>[#4843](aws/aws-cli#4843) <https://github.com/aws/aws-cli/issues/4843></code></strong>, fixes <code>[#5532](aws/aws-cli#5532) <https://github.com/aws/aws-cli/issues/5532></code>__</li> <li>api-change:<code>apprunner</code>: App Runner adds support for seven new vCPU and memory configurations.</li> <li>api-change:<code>config</code>: This release adds resourceType enums for types released in March 2023.</li> <li>api-change:<code>ecs</code>: This is a document only updated to add information about Amazon Elastic Inference (EI).</li> <li>api-change:<code>identitystore</code>: Documentation updates for Identity Store CLI command reference.</li> <li>api-change:<code>ivs-realtime</code>: Fix ParticipantToken ExpirationTime format</li> <li>api-change:<code>network-firewall</code>: AWS Network Firewall now supports IPv6-only subnets.</li> <li>api-change:<code>servicecatalog</code>: removed incorrect product type value</li> <li>api-change:<code>vpc-lattice</code>: This release removes the entities in the API doc model package for auth policies.</li> </ul> <h1>1.27.106</h1> <ul> <li>api-change:<code>amplifyuibuilder</code>: Support StorageField and custom displays for data-bound options in form builder. Support non-string operands for predicates in collections. Support choosing client to get token from.</li> <li>api-change:<code>autoscaling</code>: Documentation updates for Amazon EC2 Auto Scaling</li> <li>api-change:<code>dataexchange</code>: This release updates the value of MaxResults.</li> <li>api-change:<code>ec2</code>: C6in, M6in, M6idn, R6in and R6idn bare metal instances are powered by 3rd Generation Intel Xeon Scalable processors and offer up to 200 Gbps of network bandwidth.</li> <li>api-change:<code>elastic-inference</code>: Updated public documentation for the Describe and Tagging APIs.</li> <li>api-change:<code>sagemaker-runtime</code>: Update sagemaker-runtime command to latest version</li> <li>api-change:<code>sagemaker</code>: Amazon SageMaker Asynchronous Inference now allows customer's to receive failure model responses in S3 and receive success/failure model responses in SNS notifications.</li> <li>api-change:<code>wafv2</code>: This release rolls back association config feature for webACLs that protect CloudFront protections.</li> </ul> <h1>1.27.105</h1> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-cli/commit/300c55450414e611a461accc8d15857703c19e7a"><code>300c554</code></a> Merge branch 'release-1.27.109'</li> <li><a href="https://github.com/aws/aws-cli/commit/0f39d4d98e418390fa46f9408a704d8e6ee17642"><code>0f39d4d</code></a> Bumping version to 1.27.109</li> <li><a href="https://github.com/aws/aws-cli/commit/8c3681ff072698869446a23d15ade9b1124868dc"><code>8c3681f</code></a> Merge commit '23360bea246fc1d11ebd8c216fd29e5aa29695df' into stage-release-de...</li> <li><a href="https://github.com/aws/aws-cli/commit/83b647ea31156d5c9cb848259fde52e7631776c4"><code>83b647e</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/746f66ed34139cf3832ff59052a1a4312de44c4f"><code>746f66e</code></a> Merge branch 'release-1.27.108'</li> <li><a href="https://github.com/aws/aws-cli/commit/3d21d242ffc04df36e42234c5a2947844d7d7096"><code>3d21d24</code></a> Merge branch 'release-1.27.108' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/2a7efe33c452a87877553d3f5fb56880aad19ea2"><code>2a7efe3</code></a> Bumping version to 1.27.108</li> <li><a href="https://github.com/aws/aws-cli/commit/c52959e85c73f4701eef2f253cbf89e3419c8303"><code>c52959e</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/98e06f77e460e2cbf86ec8b5fe1231eefb0eba59"><code>98e06f7</code></a> Merge branch 'release-1.27.107'</li> <li><a href="https://github.com/aws/aws-cli/commit/1f6b68f3f8e99a39ba6b5625699a3978f1c0f48c"><code>1f6b68f</code></a> Merge branch 'release-1.27.107' into develop</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.104...1.27.109">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.104&new-version=1.27.109)](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.104 to 1.27.109. <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.109</h1> <ul> <li>api-change:<code>dlm</code>: Updated timestamp format for GetLifecyclePolicy API</li> <li>api-change:<code>docdb</code>: This release adds a new parameter 'DBClusterParameterGroupName' to 'RestoreDBClusterFromSnapshot' API to associate the name of the DB cluster parameter group while performing restore.</li> <li>api-change:<code>fsx</code>: Amazon FSx for Lustre now supports creating data repository associations on Persistent_1 and Scratch_2 file systems.</li> <li>api-change:<code>lambda</code>: This release adds a new Lambda InvokeWithResponseStream API to support streaming Lambda function responses. The release also adds a new InvokeMode parameter to Function Url APIs to control whether the response will be streamed or buffered.</li> <li>api-change:<code>quicksight</code>: This release has two changes: adding the OR condition to tag-based RLS rules in CreateDataSet and UpdateDataSet; adding RefreshSchedule and Incremental RefreshProperties operations for users to programmatically configure SPICE dataset ingestions.</li> <li>api-change:<code>redshift-data</code>: Update documentation of API descriptions as needed in support of temporary credentials with IAM identity.</li> <li>api-change:<code>servicecatalog</code>: Updates description for property</li> </ul> <h1>1.27.108</h1> <ul> <li>api-change:<code>cloudformation</code>: Including UPDATE_COMPLETE as a failed status for DeleteStack waiter.</li> <li>api-change:<code>greengrassv2</code>: Add support for SUCCEEDED value in coreDeviceExecutionStatus field. Documentation updates for Greengrass V2.</li> <li>api-change:<code>proton</code>: This release adds support for the AWS Proton service sync feature. Service sync enables managing an AWS Proton service (creating and updating instances) and all of it's corresponding service instances from a Git repository.</li> <li>api-change:<code>rds</code>: Adds and updates the SDK examples</li> </ul> <h1>1.27.107</h1> <ul> <li>bugfix:eks: Fix eks kubeconfig validations closes <code>[#6564](aws/aws-cli#6564) <https://github.com/aws/aws-cli/issues/6564></code><strong>, fixes <code>[#4843](aws/aws-cli#4843) <https://github.com/aws/aws-cli/issues/4843></code></strong>, fixes <code>[#5532](aws/aws-cli#5532) <https://github.com/aws/aws-cli/issues/5532></code>__</li> <li>api-change:<code>apprunner</code>: App Runner adds support for seven new vCPU and memory configurations.</li> <li>api-change:<code>config</code>: This release adds resourceType enums for types released in March 2023.</li> <li>api-change:<code>ecs</code>: This is a document only updated to add information about Amazon Elastic Inference (EI).</li> <li>api-change:<code>identitystore</code>: Documentation updates for Identity Store CLI command reference.</li> <li>api-change:<code>ivs-realtime</code>: Fix ParticipantToken ExpirationTime format</li> <li>api-change:<code>network-firewall</code>: AWS Network Firewall now supports IPv6-only subnets.</li> <li>api-change:<code>servicecatalog</code>: removed incorrect product type value</li> <li>api-change:<code>vpc-lattice</code>: This release removes the entities in the API doc model package for auth policies.</li> </ul> <h1>1.27.106</h1> <ul> <li>api-change:<code>amplifyuibuilder</code>: Support StorageField and custom displays for data-bound options in form builder. Support non-string operands for predicates in collections. Support choosing client to get token from.</li> <li>api-change:<code>autoscaling</code>: Documentation updates for Amazon EC2 Auto Scaling</li> <li>api-change:<code>dataexchange</code>: This release updates the value of MaxResults.</li> <li>api-change:<code>ec2</code>: C6in, M6in, M6idn, R6in and R6idn bare metal instances are powered by 3rd Generation Intel Xeon Scalable processors and offer up to 200 Gbps of network bandwidth.</li> <li>api-change:<code>elastic-inference</code>: Updated public documentation for the Describe and Tagging APIs.</li> <li>api-change:<code>sagemaker-runtime</code>: Update sagemaker-runtime command to latest version</li> <li>api-change:<code>sagemaker</code>: Amazon SageMaker Asynchronous Inference now allows customer's to receive failure model responses in S3 and receive success/failure model responses in SNS notifications.</li> <li>api-change:<code>wafv2</code>: This release rolls back association config feature for webACLs that protect CloudFront protections.</li> </ul> <h1>1.27.105</h1> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-cli/commit/300c55450414e611a461accc8d15857703c19e7a"><code>300c554</code></a> Merge branch 'release-1.27.109'</li> <li><a href="https://github.com/aws/aws-cli/commit/0f39d4d98e418390fa46f9408a704d8e6ee17642"><code>0f39d4d</code></a> Bumping version to 1.27.109</li> <li><a href="https://github.com/aws/aws-cli/commit/8c3681ff072698869446a23d15ade9b1124868dc"><code>8c3681f</code></a> Merge commit '23360bea246fc1d11ebd8c216fd29e5aa29695df' into stage-release-de...</li> <li><a href="https://github.com/aws/aws-cli/commit/83b647ea31156d5c9cb848259fde52e7631776c4"><code>83b647e</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/746f66ed34139cf3832ff59052a1a4312de44c4f"><code>746f66e</code></a> Merge branch 'release-1.27.108'</li> <li><a href="https://github.com/aws/aws-cli/commit/3d21d242ffc04df36e42234c5a2947844d7d7096"><code>3d21d24</code></a> Merge branch 'release-1.27.108' into develop</li> <li><a href="https://github.com/aws/aws-cli/commit/2a7efe33c452a87877553d3f5fb56880aad19ea2"><code>2a7efe3</code></a> Bumping version to 1.27.108</li> <li><a href="https://github.com/aws/aws-cli/commit/c52959e85c73f4701eef2f253cbf89e3419c8303"><code>c52959e</code></a> Update changelog based on model updates</li> <li><a href="https://github.com/aws/aws-cli/commit/98e06f77e460e2cbf86ec8b5fe1231eefb0eba59"><code>98e06f7</code></a> Merge branch 'release-1.27.107'</li> <li><a href="https://github.com/aws/aws-cli/commit/1f6b68f3f8e99a39ba6b5625699a3978f1c0f48c"><code>1f6b68f</code></a> Merge branch 'release-1.27.107' into develop</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.104...1.27.109">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.104&new-version=1.27.109)](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>
Thank you for this. My issue was indeed resolved by changing |
I just received a new MacBook with MacOS Catalina. I used the latest AWS CLI Bundle to install the AWS CLI on the MBP.
`gregory.bonk@greg-bonk-mbp:~/workspace$ unzip awscli-bundle.zip
Archive: awscli-bundle.zip
inflating: awscli-bundle/install
inflating: awscli-bundle/packages/PyYAML-5.2.tar.gz
inflating: awscli-bundle/packages/pyasn1-0.4.8.tar.gz
inflating: awscli-bundle/packages/docutils-0.15.2.tar.gz
inflating: awscli-bundle/packages/botocore-1.14.3.tar.gz
inflating: awscli-bundle/packages/s3transfer-0.3.0.tar.gz
inflating: awscli-bundle/packages/urllib3-1.25.7.tar.gz
inflating: awscli-bundle/packages/python-dateutil-2.8.0.tar.gz
inflating: awscli-bundle/packages/virtualenv-16.7.8.tar.gz
inflating: awscli-bundle/packages/colorama-0.4.1.tar.gz
inflating: awscli-bundle/packages/jmespath-0.9.4.tar.gz
inflating: awscli-bundle/packages/futures-3.3.0.tar.gz
inflating: awscli-bundle/packages/awscli-1.17.3.tar.gz
inflating: awscli-bundle/packages/rsa-3.4.2.tar.gz
inflating: awscli-bundle/packages/six-1.14.0.tar.gz
inflating: awscli-bundle/packages/setup/setuptools_scm-3.3.3.tar.gz
inflating: awscli-bundle/packages/setup/wheel-0.33.6.tar.gz
gregory.bonk@greg-bonk-mbp:~/workspace$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Running cmd: /usr/local/opt/python@2/bin/python2.7 virtualenv.py --no-download --python /usr/local/opt/python@2/bin/python2.7 /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-binary :all: --no-cache-dir --no-index --find-links file://. setuptools_scm-3.3.3.tar.gz
Running cmd: /usr/local/aws/bin/pip install --no-binary :all: --no-cache-dir --no-index --find-links file://. wheel-0.33.6.tar.gz
Running cmd: /usr/local/aws/bin/pip install --no-binary :all: --no-build-isolation --no-cache-dir --no-index --find-links file:///Users/gregory.bonk/workspace/devops-application/infrastructure/awscli-bundle/packages awscli-1.17.3.tar.gz`
Checking the install I see this...
gregory.bonk@greg-bonk-mbp:~/workspace$ which aws /usr/local/bin/aws gregory.bonk@greg-bonk-mbp:~/workspace/$ /usr/local/bin/aws --version aws-cli/1.17.3 Python/2.7.17 Darwin/19.2.0 botocore/1.14.3
Then when running a command to get an EKS cluster configuration...
aws eks update-kubeconfig --name my-eks --region us-west-2
This is the error...
'NoneType' object is not iterable
In the debug I see that there is a response, coming back. Appears to be something with parsing it ?
https://gist.github.com/TechnicalMercenary/48f15680f1fcd506b256e84157f08e30
The text was updated successfully, but these errors were encountered: