-
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
s3 commands that list buckets will use ListObjectsV2 #3549
Conversation
The errors come from the fact that botocore has a customization to automatically urlencode/decode params. These customizations are configured per operation (in botocore), so we'd need something similar for ListObjectsV2 now that we're not using ListObjects. https://github.com/boto/botocore/blob/develop/botocore/handlers.py#L881 We'd also need to do a thorough round of testing just to confirm there are no unintended negative side effects. Let me know if you have any other questions. |
Ah, ok. I will make a PR for botocore too and comment here when the tests are passing on my branches. Agreed on the thorough testing. Thanks! |
OK, I had to make some Requester Pays related changes here and I made the encoding changes here: boto/botocore#1552 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good. I did a run of the integration tests using this PR and the botocore branch and only got one integration test failure, but it just looks like we need to update this test to use ListObjectsV2
instead of ListObjects
in the error message assertion. Otherwise, we would have got a clean run through the integration tests which is awesome.
Codecov Report
@@ Coverage Diff @@
## develop #3549 +/- ##
==========================================
+ Coverage 94.87% 94.9% +0.03%
==========================================
Files 174 175 +1
Lines 13369 13416 +47
==========================================
+ Hits 12684 12733 +49
+ Misses 685 683 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks! 🚢
Changelog: 1.16.78 ======= * api-change:``elasticbeanstalk``: Update elasticbeanstalk command to latest version * api-change:``apigatewaymanagementapi``: Update apigatewaymanagementapi command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``globalaccelerator``: Update globalaccelerator command to latest version * api-change:``apigatewayv2``: Update apigatewayv2 command to latest version 1.16.77 ======= * api-change:``quicksight``: Update quicksight command to latest version * enhancement:``cloudformation``: Update ``cloudformation package`` command to upload readme and license files * api-change:``ecr``: Update ecr command to latest version 1.16.76 ======= * api-change:``cloudformation``: Update cloudformation command to latest version * api-change:``redshift``: Update redshift command to latest version * api-change:``alexaforbusiness``: Update alexaforbusiness command to latest version 1.16.75 ======= * api-change:``pinpoint-email``: Update pinpoint-email command to latest version * api-change:``organizations``: Update organizations command to latest version 1.16.74 ======= * bugfix:appstream: Fix issue where --feedback-url was loading the content of the url to use as the input value. * api-change:``glue``: Update glue command to latest version * api-change:``eks``: Update eks command to latest version * api-change:``route53``: Update route53 command to latest version * api-change:``sagemaker``: Update sagemaker command to latest version 1.16.73 ======= * api-change:``connect``: Update connect command to latest version * api-change:``mediastore``: Update mediastore command to latest version * enhancement:AssumeRole: Add support for duration_seconds in CLI config profiles (boto/botocore`#1600 <https://github.com/aws/aws-cli/issues/1600>`__). * api-change:``ecs``: Update ecs command to latest version 1.16.72 ======= * api-change:``alexaforbusiness``: Update alexaforbusiness command to latest version * api-change:``servicecatalog``: Update servicecatalog command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``iam``: Update iam command to latest version 1.16.71 ======= * api-change:``medialive``: Update medialive command to latest version * api-change:``rds``: Update rds command to latest version * api-change:``codebuild``: Update codebuild command to latest version * api-change:``elbv2``: Update elbv2 command to latest version 1.16.70 ======= * api-change:``ce``: Update ce command to latest version * api-change:``mediatailor``: Update mediatailor command to latest version * api-change:``mq``: Update mq command to latest version 1.16.69 ======= * api-change:``s3``: Update s3 command to latest version * api-change:``health``: Update health command to latest version 1.16.68 ======= * api-change:``mediaconvert``: Update mediaconvert command to latest version * api-change:``devicefarm``: Update devicefarm command to latest version * api-change:``storagegateway``: Update storagegateway command to latest version * api-change:``servicecatalog``: Update servicecatalog command to latest version 1.16.67 ======= * api-change:``s3``: Update s3 command to latest version 1.16.66 ======= * api-change:``lambda``: Update lambda command to latest version * api-change:``stepfunctions``: Update stepfunctions command to latest version * api-change:``kafka``: Update kafka command to latest version * api-change:``xray``: Update xray command to latest version * api-change:``serverlessrepo``: Update serverlessrepo command to latest version * api-change:``elbv2``: Update elbv2 command to latest version * api-change:``events``: Update events command to latest version * api-change:``s3``: Update s3 command to latest version 1.16.65 ======= * api-change:``sagemaker``: Update sagemaker command to latest version * api-change:``appmesh``: Update appmesh command to latest version * api-change:``license-manager``: Update license-manager command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``lightsail``: Update lightsail command to latest version * api-change:``servicediscovery``: Update servicediscovery command to latest version 1.16.64 ======= * api-change:``dynamodb``: Update dynamodb command to latest version * api-change:``fsx``: Update fsx command to latest version * api-change:``securityhub``: Update securityhub command to latest version * api-change:``rds``: Update rds command to latest version 1.16.63 ======= * api-change:``meteringmarketplace``: Update meteringmarketplace command to latest version * api-change:``kinesisanalytics``: Update kinesisanalytics command to latest version * api-change:``logs``: Update logs command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``codedeploy``: Update codedeploy command to latest version * api-change:``mediaconnect``: Update mediaconnect command to latest version * api-change:``kinesisanalyticsv2``: Update kinesisanalyticsv2 command to latest version * api-change:``comprehendmedical``: Update comprehendmedical command to latest version * api-change:``ecs``: Update ecs command to latest version * api-change:``translate``: Update translate command to latest version 1.16.62 ======= * api-change:``globalaccelerator``: Update globalaccelerator command to latest version * api-change:``sms``: Update sms command to latest version * api-change:``greengrass``: Update greengrass command to latest version * api-change:``iot``: Update iot command to latest version * api-change:``kms``: Update kms command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``s3``: Update s3 command to latest version * api-change:``iotanalytics``: Update iotanalytics command to latest version 1.16.61 ======= * api-change:``amplify``: Update amplify command to latest version * api-change:``transfer``: Update transfer command to latest version * api-change:``s3``: Update s3 command to latest version * api-change:``snowball``: Update snowball command to latest version * api-change:``robomaker``: Update robomaker command to latest version * api-change:``datasync``: Update datasync command to latest version 1.16.60 ======= * api-change:``rekognition``: Update rekognition command to latest version 1.16.59 ======= * api-change:``quicksight``: Update quicksight command to latest version * api-change:``autoscaling-plans``: Update autoscaling-plans command to latest version * api-change:``devicefarm``: Update devicefarm command to latest version * api-change:``ssm``: Update ssm command to latest version * api-change:``rds-data``: Update rds-data command to latest version * api-change:``xray``: Update xray command to latest version * api-change:``medialive``: Update medialive command to latest version * api-change:``cloudfront``: Update cloudfront command to latest version * api-change:``appsync``: Update appsync command to latest version * api-change:``cloudwatch``: Update cloudwatch command to latest version * api-change:``redshift``: Update redshift command to latest version 1.16.58 ======= * api-change:``config``: Update config command to latest version * api-change:``cloudformation``: Update cloudformation command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``cloudtrail``: Update cloudtrail command to latest version * api-change:``workdocs``: Update workdocs command to latest version * api-change:``mediaconvert``: Update mediaconvert command to latest version * api-change:``devicefarm``: Update devicefarm command to latest version * api-change:``lambda``: Update lambda command to latest version * api-change:``lightsail``: Update lightsail command to latest version * api-change:``iot``: Update iot command to latest version * api-change:``batch``: Update batch command to latest version * api-change:``workspaces``: Update workspaces command to latest version * api-change:``rds``: Update rds command to latest version 1.16.57 ======= * api-change:``workspaces``: Update workspaces command to latest version * api-change:``ecs``: Update ecs command to latest version * api-change:``ce``: Update ce command to latest version * api-change:``comprehend``: Update comprehend command to latest version * api-change:``ssm``: Update ssm command to latest version 1.16.56 ======= * api-change:``rds``: Update rds command to latest version * api-change:``transcribe``: Update transcribe command to latest version * api-change:``pinpoint``: Update pinpoint command to latest version * api-change:``s3``: Update s3 command to latest version * api-change:``redshift``: Update redshift command to latest version * api-change:``dms``: Update dms command to latest version * api-change:``codebuild``: Update codebuild command to latest version * api-change:``route53resolver``: Update route53resolver command to latest version * api-change:``s3control``: Update s3control command to latest version * api-change:``directconnect``: Update directconnect command to latest version * api-change:``comprehend``: Update comprehend command to latest version * api-change:``ram``: Update ram command to latest version * api-change:``sms-voice``: Update sms-voice command to latest version * api-change:``iam``: Update iam command to latest version * api-change:``ecs``: Update ecs command to latest version 1.16.55 ======= * api-change:``autoscaling``: Update autoscaling command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``resource-groups``: Update resource-groups command to latest version * api-change:``sagemaker``: Update sagemaker command to latest version * api-change:``mediatailor``: Update mediatailor command to latest version * api-change:``sns``: Update sns command to latest version * api-change:``servicecatalog``: Update servicecatalog command to latest version 1.16.54 ======= * api-change:``chime``: Update chime command to latest version * api-change:``budgets``: Update budgets command to latest version * api-change:``redshift``: Update redshift command to latest version 1.16.53 ======= * api-change:``budgets``: Update budgets command to latest version * api-change:``firehose``: Update firehose command to latest version * api-change:``cloudformation``: Update cloudformation command to latest version * api-change:``polly``: Update polly command to latest version * api-change:``rds``: Update rds command to latest version * api-change:``batch``: Update batch command to latest version * api-change:``codepipeline``: Update codepipeline command to latest version 1.16.52 ======= * api-change:``mediapackage``: Update mediapackage command to latest version 1.16.51 ======= * api-change:``medialive``: Update medialive command to latest version * api-change:``events``: Update events command to latest version * api-change:``dlm``: Update dlm command to latest version 1.16.50 ======= * api-change:``ce``: Update ce command to latest version * api-change:``dms``: Update dms command to latest version * api-change:``ec2``: Update ec2 command to latest version 1.16.49 ======= * api-change:``waf-regional``: Update waf-regional command to latest version * api-change:``pinpoint``: Update pinpoint command to latest version * api-change:``pinpoint-email``: Update pinpoint-email command to latest version * api-change:``apigateway``: Update apigateway command to latest version * api-change:``codebuild``: Update codebuild command to latest version * api-change:``ec2``: Update ec2 command to latest version 1.16.48 ======= * api-change:``serverlessrepo``: Update serverlessrepo command to latest version * api-change:``eks``: Update eks command to latest version 1.16.47 ======= * api-change:``rekognition``: Update rekognition command to latest version * api-change:``clouddirectory``: Update clouddirectory command to latest version 1.16.46 ======= * api-change:``servicecatalog``: Update servicecatalog command to latest version 1.16.45 ======= * api-change:``greengrass``: Update greengrass command to latest version * api-change:``config``: Update config command to latest version * api-change:``secretsmanager``: Update secretsmanager command to latest version * api-change:``mediastore-data``: Update mediastore-data command to latest version 1.16.44 ======= * api-change:``chime``: Update chime command to latest version * bugfix:Credentials: Fix issue where incorrect region was being used when using assume role credentials outside of the `aws` partition. * api-change:``rds``: Update rds command to latest version * api-change:``dms``: Update dms command to latest version 1.16.43 ======= * api-change:``alexaforbusiness``: Update alexaforbusiness command to latest version * api-change:``ssm``: Update ssm command to latest version * api-change:``sagemaker``: Update sagemaker command to latest version 1.16.42 ======= * api-change:``ec2``: Update ec2 command to latest version 1.16.41 ======= * api-change:``codestar``: Update codestar command to latest version * api-change:``alexaforbusiness``: Update alexaforbusiness command to latest version 1.16.40 ======= * api-change:``ec2``: Update ec2 command to latest version 1.16.39 ======= * api-change:``shield``: Update shield command to latest version * api-change:``inspector``: Update inspector command to latest version 1.16.38 ======= * api-change:``workspaces``: Update workspaces command to latest version * api-change:``ssm``: Update ssm command to latest version 1.16.37 ======= * api-change:``medialive``: Update medialive command to latest version * api-change:``appstream``: Update appstream command to latest version * api-change:``route53``: Update route53 command to latest version 1.16.36 ======= * api-change:``apigateway``: Update apigateway command to latest version * api-change:``events``: Update events command to latest version 1.16.35 ======= * api-change:``lightsail``: Update lightsail command to latest version * api-change:``glue``: Update glue command to latest version * api-change:``resource-groups``: Update resource-groups command to latest version 1.16.34 ======= * api-change:``lambda``: Update lambda command to latest version * api-change:``servicecatalog``: Update servicecatalog command to latest version * api-change:``rds``: Update rds command to latest version 1.16.33 ======= * api-change:``cloudtrail``: Update cloudtrail command to latest version 1.16.32 ======= * api-change:``mediaconvert``: Update mediaconvert command to latest version * api-change:``directconnect``: Update directconnect command to latest version * api-change:``athena``: Update athena command to latest version * api-change:``transcribe``: Update transcribe command to latest version * api-change:``ec2``: Update ec2 command to latest version 1.16.31 ======= * api-change:``es``: Update es command to latest version * api-change:``comprehend``: Update comprehend command to latest version * api-change:``transcribe``: Update transcribe command to latest version 1.16.30 ======= * api-change:``ssm``: Update ssm command to latest version 1.16.29 ======= * api-change:``iot``: Update iot command to latest version * api-change:``iot-jobs-data``: Update iot-jobs-data command to latest version 1.16.28 ======= * api-change:``ds``: Update ds command to latest version 1.16.27 ======= * api-change:``ssm``: Update ssm command to latest version * api-change:``storagegateway``: Update storagegateway command to latest version * api-change:``apigateway``: Update apigateway command to latest version * api-change:``codebuild``: Update codebuild command to latest version 1.16.26 ======= * api-change:``sagemaker``: Update sagemaker command to latest version * api-change:``secretsmanager``: Update secretsmanager command to latest version 1.16.25 ======= * api-change:``rekognition``: Update rekognition command to latest version * api-change:``guardduty``: Update guardduty command to latest version 1.16.24 ======= * api-change:``codestar``: Update codestar command to latest version * bugfix:s3: Fixed a bug where `--sse-c-key` and `--sse-c-copy-source-key` were modeled as string values rather than bytes values, which make them impossible to use on python 3 unless your key happened to be all unicode. * api-change:``ec2``: Update ec2 command to latest version 1.16.23 ======= * api-change:``apigateway``: Update apigateway command to latest version * api-change:``codecommit``: Update codecommit command to latest version * api-change:``mq``: Update mq command to latest version 1.16.22 ======= * api-change:``glue``: Update glue command to latest version * api-change:``rds``: Update rds command to latest version * api-change:``opsworkscm``: Update opsworkscm command to latest version * api-change:``sqs``: Update sqs command to latest version 1.16.21 ======= * api-change:``cloudfront``: Update cloudfront command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``ds``: Update ds command to latest version 1.16.20 ======= * api-change:``connect``: Update connect command to latest version * api-change:``rds``: Update rds command to latest version 1.16.19 ======= * api-change:``mediaconvert``: Update mediaconvert command to latest version 1.16.18 ======= * api-change:``rds``: Update rds command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``ds``: Update ds command to latest version 1.16.17 ======= * api-change:``s3``: Update s3 command to latest version * api-change:``organizations``: Update organizations command to latest version * api-change:``cloudwatch``: Update cloudwatch command to latest version 1.16.16 ======= * api-change:``es``: Update es command to latest version * api-change:``rekognition``: Update rekognition command to latest version 1.16.15 ======= * api-change:``ec2``: Update ec2 command to latest version * api-change:``codebuild``: Update codebuild command to latest version * api-change:``elastictranscoder``: Update elastictranscoder command to latest version * enhancement:s3: ``aws s3`` subcommands that list objects will use ListObjectsV2 instead of ListObjects `#3549 <https://github.com/aws/aws-cli/issues/3549>`__. * api-change:``elasticache``: Update elasticache command to latest version * api-change:``cloudwatch``: Update cloudwatch command to latest version * api-change:``secretsmanager``: Update secretsmanager command to latest version * api-change:``ecs``: Update ecs command to latest version 1.16.14 ======= * api-change:``polly``: Update polly command to latest version 1.16.13 ======= * api-change:``fms``: Update fms command to latest version * api-change:``connect``: Update connect command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``ses``: Update ses command to latest version 1.16.12 ======= * api-change:``ssm``: Update ssm command to latest version * api-change:``opsworkscm``: Update opsworkscm command to latest version 1.16.11 ======= * api-change:``redshift``: Update redshift command to latest version * api-change:``cloudhsmv2``: Update cloudhsmv2 command to latest version 1.16.10 ======= * api-change:``config``: Update config command to latest version * api-change:``logs``: Update logs command to latest version 1.16.9 ====== * api-change:``apigateway``: Update apigateway command to latest version * api-change:``mediaconvert``: Update mediaconvert command to latest version * api-change:``codecommit``: Update codecommit command to latest version 1.16.8 ====== * api-change:``dynamodb``: Update dynamodb command to latest version * api-change:``rds``: Update rds command to latest version * api-change:``elb``: Update elb command to latest version * api-change:``appstream``: Update appstream command to latest version * api-change:``s3``: Update s3 command to latest version 1.16.7 ====== * api-change:``rds``: Update rds command to latest version * api-change:``rekognition``: Update rekognition command to latest version 1.16.6 ====== * api-change:``waf``: Update waf command to latest version * api-change:``waf-regional``: Update waf-regional command to latest version * api-change:``eks``: Update eks command to latest version 1.16.5 ====== * api-change:``sagemaker``: Update sagemaker command to latest version * api-change:``codebuild``: Update codebuild command to latest version 1.16.4 ====== * api-change:``sagemaker-runtime``: Update sagemaker-runtime command to latest version * api-change:``glue``: Update glue command to latest version * api-change:``mediapackage``: Update mediapackage command to latest version 1.16.3 ====== * api-change:``glue``: Update glue command to latest version * api-change:``xray``: Update xray command to latest version 1.16.2 ====== * api-change:``redshift``: Update redshift command to latest version * api-change:``iotanalytics``: Update iotanalytics command to latest version * api-change:``iot``: Update iot command to latest version * api-change:``signer``: Update signer command to latest version 1.16.1 ====== * api-change:``glue``: Update glue command to latest version 1.16.0 ====== * api-change:``events``: Update events command to latest version * feature:urllib3: Add support for ipv6 proxies by upgrading urllib3 version. * api-change:``cognito-idp``: Update cognito-idp command to latest version 1.15.85 ======= * api-change:``iotanalytics``: Update iotanalytics command to latest version * api-change:``medialive``: Update medialive command to latest version * api-change:``rekognition``: Update rekognition command to latest version * api-change:``iot``: Update iot command to latest version * api-change:``lex-models``: Update lex-models command to latest version 1.15.84 ======= * api-change:``snowball``: Update snowball command to latest version 1.15.83 ======= * api-change:``elasticbeanstalk``: Update elasticbeanstalk command to latest version * api-change:``ec2``: Update ec2 command to latest version * api-change:``rds``: Update rds command to latest version * api-change:``dlm``: Update dlm command to latest version
Is there some specific reason to prefer ListObjects V2 over V1? Some S3 implementations like S3Proxy do not implement the former. |
* feat: allow invoking built CDK synthesized templates * run black * fixing testing issue * add unit testing to cover custom resource Id * run black * skip normalizing the resources that have been normalized before * apply pr comments * apply pr comments
This PR makes the AWS CLI use ListObjectsV2 when doing operations in the s3 subcommand like ls, cp, and sync. The S3 API docs recommend using ListObjectsV2 instead of V1.
I updated the code and the tests to use V2. It seems like there are some errors around the tests for requester pays features that I may have introduced, but I don't understand where they are coming from. If you have suggestions on how to fix those I can do that. Thanks!