-
Notifications
You must be signed in to change notification settings - Fork 78
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
Autopagination not working #147
Comments
I think this can be fixed by setting a default value of I believe previous versions of the module are similarly affected, they would just return a partial output without complaining. You should be able to restore this behavior by passing Information for the implementer of the fix: AWS.Tools will have a different behavior and should be tested as well. |
I've installed AWS.Tools version 4.0.5.0 and have run into the following behaviour: With 15,000 snapshots in the account, running 'Get-EC2Snapshot -Owner self' returns the same error: |
Hi @lgaudreau, Good afternoon. I was going through the issue backlog and came across the issue. The Get-EC2Snapshot -MaxResult 10 -NextToken $null
Get-EC2Snapshot -MaxResult 10 -NextToken $AWSHistory.LastServiceResponse.NextToken Output of
Output of
Please try with the latest version of Powershell Tools/Modules and confirm if the issue is resolved. Thanks, |
Hi Ashish,
Using -NextToken works correctly as a workaround. Auto-pagination is still not working using the latest version:
Output of Get-EC2Snapshot -Owner self
Get-EC2Snapshot: You have exceeded the output limit for an unpaginated response. Retry your request using pagination parameters.
Output of Get-InstalledModule | Select Version,Name
Version Name
------- ----
4.1.2.0 AWS.Tools.Common
4.1.2.0 AWS.Tools.EC2
1.0.2.0 AWS.Tools.Installer
4.1.2.0 AWS.Tools.RDS
4.1.2.0 AWS.Tools.Route53
4.1.2.0 AWS.Tools.S3
4.1.2.0 AWS.Tools.WAFV2
4.1.2.0 AWS.Tools.WorkDocs
4.1.2.0 AWS.Tools.WorkSpaces
Output of Get-AWSPowerShellVersion
AWS Tools for PowerShell
Version 4.1.2.0
Copyright 2012-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Amazon Web Services SDK for .NET
Core Runtime Version 3.5.1.23
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Release notes: https://github.com/aws/aws-tools-for-powershell/blob/master/CHANGELOG.md
This software includes third party software subject to the following copyrights:
- Logging from log4net, Apache License
[http://logging.apache.org/log4net/license.html]
Thanks,
Lincoln
…________________________________
From: Ashish Dhingra <notifications@github.com>
Sent: Wednesday, October 14, 2020 3:26 PM
To: aws/aws-tools-for-powershell <aws-tools-for-powershell@noreply.github.com>
Cc: lgaudreau <lincolng@outlook.com>; Mention <mention@noreply.github.com>
Subject: Re: [aws/aws-tools-for-powershell] Autopagination not working (#147)
Hi @lgaudreau<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flgaudreau&data=02%7C01%7C%7Cfecf12128b4b43c4678608d8707708c7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637383003827386214&sdata=ZbCOpl1JTjWo7oKZJ9eVZVBClJshSSwkghjvgVZA%2By0%3D&reserved=0>,
Good afternoon.
I was going through the issue backlog and came across the issue. The -NextToken appears to work fine for me:
Get-EC2Snapshot -MaxResult 10 -NextToken $null
Get-EC2Snapshot -MaxResult 10 -NextToken $AWSHistory.LastServiceResponse.NextToken
Output of Get-InstalledModule | Select Version,Name
Version Name
------- ----
4.1.2.0 AWS.Tools.EC2
4.1.2.0 AWS.Tools.IdentityManagement
4.1.2.0 AWS.Tools.Glacier
4.1.2.0 AWS.Tools.S3
4.1.2.0 AWS.Tools.SQS
4.1.2.0 AWS.Tools.Common
4.1.2.0 AWS.Tools.SimpleNotificationService
4.1.2.0 AWSPowerShell
1.0.2.0 AWS.Tools.Installer
2.0.0.0 AWSLambdaPSCore
4.1.2.0 AWSPowerShell.NetCore
Output of Get-AWSPowerShellVersion
AWS Tools for Windows PowerShell
Version 3.3.119.0
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Amazon Web Services SDK for .NET
Core Runtime Version 3.3.17.0
Copyright 2009-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Release notes: https://aws.amazon.com/releasenotes/PowerShell
This software includes third party software subject to the following copyrights:
- Logging from log4net, Apache License
[http://logging.apache.org/log4net/license.html]
Please try with the latest version of Powershell Tools/Modules and confirm if the issue is resolved.
Thanks,
Ashish
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faws%2Faws-tools-for-powershell%2Fissues%2F147%23issuecomment-708612084&data=02%7C01%7C%7Cfecf12128b4b43c4678608d8707708c7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637383003827386214&sdata=fyLICnHhdIA1hrSDt4s%2FaTgyTk98gjavIGSiSf5HDPo%3D&reserved=0>, or unsubscribe<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKWFK6E27FHX6VAFBYZCELDSKX3N3ANCNFSM4MJ6IN2Q&data=02%7C01%7C%7Cfecf12128b4b43c4678608d8707708c7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637383003827386214&sdata=cfPs%2Bzpvt6JvFqO6bknqgGdtbzlZgq0M7af3nPCX1tU%3D&reserved=0>.
|
Hi @lgaudreau, Thanks for your reply. I think we already have a feature request #117 to support auto-pagination for Thanks, |
While running a command like 'get-ec2snapshot' in a region where there are more than 1000 snapshots, the command fails with
Get-EC2Snapshot: You have exceeded the output limit for an unpaginated response. Retry your request using pagination parameters.
Running with -maxresults returns a warning that the command is deprecated, but the solution presented (to pipe the results to Select-Object -First ##) also fails since it requires returning all objects first.
This was not happening in AWSPowerShell 3.3.563.1 at least.
The text was updated successfully, but these errors were encountered: