aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.44k stars 4.1k forks source link

describe-vpc-endpoints does not support service-name filter #8391

Closed kchik-confluent closed 7 months ago

kchik-confluent commented 9 months ago

Describe the bug

Getting Unsupported filter attribute: [service-name] when using the describe-vpc-endpoints command, which contradicts the documentation.

The VPC endpoint exists and can be queried from the AWS console using the service name filter.

Other filters work as intended, only service-name results in an error.

Cannot reproduce using other AWS accounts. The service-name filter works as intended when another account is used.

Expected Behavior

The command returns a list of VPC endpoints that have the service name com.amazonaws.us-west-2.s3

Current Behavior

➜ aws ec2 describe-vpc-endpoints --filters "Name=service-name,Values=com.amazonaws.us-west-2.s3"

An error occurred (InvalidParameterValue) when calling the DescribeVpcEndpoints operation: Unsupported filter attribute: [service-name]

Reproduction Steps

Run aws ec2 describe-vpc-endpoints --filters "Name=service-name,Values=com.amazonaws.us-west-2.s3"

Possible Solution

No response

Additional Information/Context

Traceback from using --debug

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 460, in main
    return command_table[parsed_args.command](remaining, parsed_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 595, in __call__
    return command_table[parsed_args.operation](remaining, parsed_globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 798, in __call__
    return self._operation_caller.invoke(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 931, in invoke
    self._display_response(operation_name, response, parsed_globals)
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 953, in _display_response
    formatter(command_name, response, stream)
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/formatter.py", line 77, in __call__
    response_data = response.build_full_result()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/paginate.py", line 446, in build_full_result
    for response in self:
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/paginate.py", line 252, in __iter__
    response = self._make_request(current_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/paginate.py", line 329, in _make_request
    return self._method(**current_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/client.py", line 724, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the DescribeVpcEndpoints operation: Unsupported filter attribute: [service-name]

An error occurred (InvalidParameterValue) when calling the DescribeVpcEndpoints operation: Unsupported filter attribute: [service-name]

CLI version used

2.14.5

Environment details (OS name and version, etc.)

macOS Monterey 12.7.1

RyanFitzSimmonsAK commented 9 months ago

Hi @kchik-confluent, thanks for reaching out. I had some trouble reproducing this behavior. Could you provide debug logs of this behavior? You can get debug logs by adding --debug to your command, and redacting any sensitive information. Thanks!

kchik-confluent commented 9 months ago
➜ aws ec2 describe-vpc-endpoints --filters "Name=service-name,Values=com.amazonaws.us-west-2.s3" --debug
2023-12-06 12:18:13,289 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.14.5 Python/3.11.6 Darwin/21.6.0 source/arm64
2023-12-06 12:18:13,289 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['ec2', 'describe-vpc-endpoints', '--filters', 'Name=service-name,Values=com.amazonaws.us-west-2.s3', '--debug']
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x103b00680>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x10391b7e0>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x1035e4720>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x1035e5da0>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function alias_opsworks_cm at 0x103b107c0>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_history_commands at 0x10397ac00>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.devcommands.CLIDevCommand'>>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_waiters at 0x103b03740>
2023-12-06 12:18:13,313 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method AliasSubCommandInjector.on_building_command_table of <awscli.alias.AliasSubCommandInjector object at 0x103bbb0d0>>
2023-12-06 12:18:13,314 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/data/cli.json
2023-12-06 12:18:13,314 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_types at 0x103a2aa20>
2023-12-06 12:18:13,314 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function no_sign_request at 0x103a2ad40>
2023-12-06 12:18:13,314 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_verify_ssl at 0x103a2aca0>
2023-12-06 12:18:13,314 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_read_timeout at 0x103a2ae80>
2023-12-06 12:18:13,314 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_connect_timeout at 0x103a2ade0>
2023-12-06 12:18:13,314 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <built-in method update of dict object at 0x103bb8380>
2023-12-06 12:18:13,315 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.14.5 Python/3.11.6 Darwin/21.6.0 source/arm64 prompt/off
2023-12-06 12:18:13,315 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['ec2', 'describe-vpc-endpoints', '--filters', 'Name=service-name,Values=com.amazonaws.us-west-2.s3', '--debug']
2023-12-06 12:18:13,315 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x103b01120>
2023-12-06 12:18:13,315 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x103435260>
2023-12-06 12:18:13,316 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x103b85f80>
2023-12-06 12:18:13,316 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function no_pager_handler at 0x102ff4900>
2023-12-06 12:18:13,316 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x103451120>
2023-12-06 12:18:13,318 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/
2023-12-06 12:18:13,322 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x10397a3e0>
2023-12-06 12:18:13,322 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x1038fb880>
2023-12-06 12:18:13,336 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/data/ec2/2016-11-15/service-2.json
2023-12-06 12:18:13,372 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ec2: calling handler functools.partial(<function _remove_commands at 0x103a4efc0>, commands_to_remove=['import-instance', 'import-volume'])
2023-12-06 12:18:13,372 - MainThread - awscli.customizations.removals - DEBUG - Removing operation: import-instance
2023-12-06 12:18:13,372 - MainThread - awscli.customizations.removals - DEBUG - Removing operation: import-volume
2023-12-06 12:18:13,372 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ec2: calling handler <function add_waiters at 0x103b03740>
2023-12-06 12:18:13,386 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/data/ec2/2016-11-15/waiters-2.json
2023-12-06 12:18:13,386 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ec2: calling handler <bound method AliasSubCommandInjector.on_building_command_table of <awscli.alias.AliasSubCommandInjector object at 0x103bbb0d0>>
2023-12-06 12:18:13,387 - MainThread - awscli.clidriver - DEBUG - OrderedDict([('dry-run', <awscli.arguments.BooleanArgument object at 0x108d15850>), ('no-dry-run', <awscli.arguments.BooleanArgument object at 0x108d15950>), ('vpc-endpoint-ids', <awscli.arguments.ListArgument object at 0x108d15990>), ('filters', <awscli.arguments.ListArgument object at 0x108d15a10>), ('max-results', <awscli.arguments.CLIArgument object at 0x108d15bd0>), ('next-token', <awscli.arguments.CLIArgument object at 0x1088c3150>)])
2023-12-06 12:18:13,387 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler <function add_streaming_output_arg at 0x103b01760>
2023-12-06 12:18:13,387 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler <function rename_arg.<locals>._rename_arg at 0x103b86e80>
2023-12-06 12:18:13,387 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler <function rename_arg.<locals>._rename_arg at 0x103b86f20>
2023-12-06 12:18:13,387 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler functools.partial(<function pull_up_bool at 0x103b02e80>, event_handler=<botocore.hooks.HierarchicalEmitter object at 0x102fea110>)
2023-12-06 12:18:13,387 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler <function add_cli_input_json at 0x103451e40>
2023-12-06 12:18:13,387 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler <function add_cli_input_yaml at 0x103451ee0>
2023-12-06 12:18:13,387 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler <function unify_paging_params at 0x10391bf60>
2023-12-06 12:18:13,402 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/data/ec2/2016-11-15/paginators-1.json
2023-12-06 12:18:13,402 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/data/ec2/2016-11-15/paginators-1.sdk-extras.json
2023-12-06 12:18:13,403 - MainThread - awscli.customizations.paginate - DEBUG - Modifying paging parameters for operation: DescribeVpcEndpoints
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ec2.describe-vpc-endpoints: calling handler <function add_generate_skeleton at 0x103a29120>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.ec2.describe-vpc-endpoints: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinput.CliInputJSONArgument object at 0x108d15c90>>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.ec2.describe-vpc-endpoints: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinput.CliInputYAMLArgument object at 0x108d16610>>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.ec2.describe-vpc-endpoints: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x108d41710>>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ec2_describe-vpc-endpoints: calling handler <function add_waiters at 0x103b03740>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ec2_describe-vpc-endpoints: calling handler <bound method AliasSubCommandInjector.on_building_command_table of <awscli.alias.AliasSubCommandInjector object at 0x103bbb0d0>>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event operation-args-parsed.ec2.describe-vpc-endpoints: calling handler functools.partial(<function validate_boolean_mutex_groups at 0x103b02f20>, boolean_pairs=[])
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event operation-args-parsed.ec2.describe-vpc-endpoints: calling handler functools.partial(<function check_should_enable_pagination at 0x1039300e0>, ['next-token', 'max-results'], {}, OrderedDict([('dry-run', <awscli.arguments.BooleanArgument object at 0x108d15850>), ('no-dry-run', <awscli.arguments.BooleanArgument object at 0x108d15950>), ('vpc-endpoint-ids', <awscli.arguments.ListArgument object at 0x108d15990>), ('filters', <awscli.arguments.ListArgument object at 0x108d15a10>), ('max-results', <awscli.arguments.CLIArgument object at 0x108d15bd0>), ('next-token', <awscli.arguments.CLIArgument object at 0x1088c3150>), ('cli-input-json', <awscli.customizations.cliinput.CliInputJSONArgument object at 0x108d15c90>), ('cli-input-yaml', <awscli.customizations.cliinput.CliInputYAMLArgument object at 0x108d16610>), ('starting-token', <awscli.customizations.paginate.PageArgument object at 0x108b40e90>), ('page-size', <awscli.customizations.paginate.PageArgument object at 0x108711d10>), ('max-items', <awscli.customizations.paginate.PageArgument object at 0x108d41310>), ('generate-cli-skeleton', <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x108d41710>)]))
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.dry-run: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.vpc-endpoint-ids: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.filters: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.ec2.describe-vpc-endpoints: calling handler <awscli.argprocess.ParamShorthandParser object at 0x1031f3b50>
2023-12-06 12:18:13,403 - MainThread - awscli.argprocess - DEBUG - Parsing param --filters as shorthand
2023-12-06 12:18:13,403 - MainThread - awscli.arguments - DEBUG - Unpacked value of ['Name=service-name,Values=com.amazonaws.us-west-2.s3'] for parameter "filters": [{'Name': 'service-name', 'Values': ['com.amazonaws.us-west-2.s3']}]
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.max-results: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.next-token: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.cli-input-json: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.cli-input-yaml: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.starting-token: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,403 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.page-size: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,404 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.max-items: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,404 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ec2.describe-vpc-endpoints.generate-cli-skeleton: calling handler <awscli.paramfile.URIArgumentHandler object at 0x103290c90>
2023-12-06 12:18:13,404 - MainThread - botocore.hooks - DEBUG - Event calling-command.ec2.describe-vpc-endpoints: calling handler <bound method CliInputArgument.add_to_call_parameters of <awscli.customizations.cliinput.CliInputJSONArgument object at 0x108d15c90>>
2023-12-06 12:18:13,404 - MainThread - botocore.hooks - DEBUG - Event calling-command.ec2.describe-vpc-endpoints: calling handler <bound method CliInputArgument.add_to_call_parameters of <awscli.customizations.cliinput.CliInputYAMLArgument object at 0x108d16610>>
2023-12-06 12:18:13,404 - MainThread - botocore.hooks - DEBUG - Event calling-command.ec2.describe-vpc-endpoints: calling handler <bound method GenerateCliSkeletonArgument.generate_skeleton of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x108d41710>>
2023-12-06 12:18:13,404 - MainThread - botocore.hooks - DEBUG - Event calling-command.ec2.describe-vpc-endpoints: calling handler functools.partial(<function check_should_enable_pagination_call_parameters at 0x103930540>, ['NextToken', 'MaxResults'])
2023-12-06 12:18:13,404 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2023-12-06 12:18:13,404 - MainThread - botocore.credentials - INFO - Found credentials in environment variables.
2023-12-06 12:18:13,405 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/data/endpoints.json
2023-12-06 12:18:13,411 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x1022d5800>
2023-12-06 12:18:13,427 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/data/ec2/2016-11-15/endpoint-rule-set-1.json
2023-12-06 12:18:13,427 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/data/partitions.json
2023-12-06 12:18:13,432 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.ec2: calling handler <function add_generate_presigned_url at 0x1022162a0>
2023-12-06 12:18:13,432 - MainThread - botocore.configprovider - DEBUG - Looking for endpoint for ec2 via: environment_service
2023-12-06 12:18:13,432 - MainThread - botocore.configprovider - DEBUG - Looking for endpoint for ec2 via: environment_global
2023-12-06 12:18:13,432 - MainThread - botocore.configprovider - DEBUG - Looking for endpoint for ec2 via: config_service
2023-12-06 12:18:13,432 - MainThread - botocore.configprovider - DEBUG - Looking for endpoint for ec2 via: config_global
2023-12-06 12:18:13,432 - MainThread - botocore.configprovider - DEBUG - No configured endpoint found.
2023-12-06 12:18:13,453 - MainThread - botocore.endpoint - DEBUG - Setting ec2 timeout as (60, 60)
2023-12-06 12:18:13,454 - MainThread - botocore.regions - DEBUG - Calling endpoint provider with parameters: {'Region': 'us-west-2', 'UseDualStack': False, 'UseFIPS': False}
2023-12-06 12:18:13,454 - MainThread - botocore.regions - DEBUG - Endpoint provider result: https://ec2.us-west-2.amazonaws.com
2023-12-06 12:18:13,454 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.ec2.DescribeVpcEndpoints: calling handler <function base64_decode_input_blobs at 0x103b86020>
2023-12-06 12:18:13,454 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.ec2.DescribeVpcEndpoints: calling handler <bound method ParameterAlias.alias_parameter_in_call of <botocore.handlers.ParameterAlias object at 0x1022f7b10>>
2023-12-06 12:18:13,454 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.ec2.DescribeVpcEndpoints: calling handler <function generate_idempotent_uuid at 0x1022d7c40>
2023-12-06 12:18:13,454 - MainThread - botocore.hooks - DEBUG - Event before-call.ec2.DescribeVpcEndpoints: calling handler <function inject_api_version_header_if_needed at 0x1022f9760>
2023-12-06 12:18:13,454 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=DescribeVpcEndpoints) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'aws-cli/2.14.5 Python/3.11.6 Darwin/21.6.0 source/arm64 prompt/off command/ec2.describe-vpc-endpoints'}, 'body': {'Action': 'DescribeVpcEndpoints', 'Version': '2016-11-15', 'Filter.1.Name': 'service-name', 'Filter.1.Value.1': 'com.amazonaws.us-west-2.s3'}, 'url': 'https://ec2.us-west-2.amazonaws.com/', 'context': {'client_region': 'us-west-2', 'client_config': <botocore.config.Config object at 0x1092a8a10>, 'has_streaming_input': False, 'auth_type': None}}
2023-12-06 12:18:13,454 - MainThread - botocore.hooks - DEBUG - Event request-created.ec2.DescribeVpcEndpoints: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x10329ee50>>
2023-12-06 12:18:13,454 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ec2.DescribeVpcEndpoints: calling handler <function set_operation_specific_signer at 0x1022d7b00>
2023-12-06 12:18:13,455 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2023-12-06 12:18:13,455 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-www-form-urlencoded; charset=utf-8
host:ec2.us-west-2.amazonaws.com
x-amz-date:20231206T171813Z
x-amz-security-token:[REDACTED]

content-type;host;x-amz-date;x-amz-security-token
c848ee9414826b641616ce27c537ad0583a6688076b1f38b1afd3aac012e2dcc
2023-12-06 12:18:13,455 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20231206T171813Z
20231206/us-west-2/ec2/aws4_request
943a9f538ffd71c4a0524bf258c72a3a5f574c7d4a6c0f2d79e8c939d9cbbdd5
2023-12-06 12:18:13,455 - MainThread - botocore.auth - DEBUG - Signature:
3d9e9dd956cd54d8db04d07b84b52d90db6ee8b7411c5588298a18fd8acb1661
2023-12-06 12:18:13,455 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ec2.us-west-2.amazonaws.com/, headers={'Content-Type': b'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': b'aws-cli/2.14.5 Python/3.11.6 Darwin/21.6.0 source/arm64 prompt/off command/ec2.describe-vpc-endpoints', 'X-Amz-Date': b'20231206T171813Z', 'X-Amz-Security-Token': b'[REDACTED]', 'Authorization': b'AWS4-HMAC-SHA256 Credential=ASIATOUPL7DJCSJR62HF/20231206/us-west-2/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token, Signature=3d9e9dd956cd54d8db04d07b84b52d90db6ee8b7411c5588298a18fd8acb1661', 'Content-Length': '117'}>
2023-12-06 12:18:13,456 - MainThread - botocore.httpsession - DEBUG - Certificate path: /opt/homebrew/lib/python3.11/site-packages/certifi/cacert.pem
2023-12-06 12:18:13,456 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): ec2.us-west-2.amazonaws.com:443
2023-12-06 12:18:14,564 - MainThread - urllib3.connectionpool - DEBUG - https://ec2.us-west-2.amazonaws.com:443 "POST / HTTP/1.1" 400 None
2023-12-06 12:18:14,570 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amzn-RequestId': 'd4f9a5ec-4c8b-4cf8-b3a6-73cb5a8bdc2d', 'Cache-Control': 'no-cache, no-store', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'vary': 'accept-encoding', 'Content-Type': 'text/xml;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Date': 'Wed, 06 Dec 2023 17:18:14 GMT', 'Connection': 'close', 'Server': 'AmazonEC2'}
2023-12-06 12:18:14,570 - MainThread - botocore.parsers - DEBUG - Response body:
b'<?xml version="1.0" encoding="UTF-8"?>\n<Response><Errors><Error><Code>InvalidParameterValue</Code><Message>Unsupported filter attribute: [service-name]</Message></Error></Errors><RequestID>d4f9a5ec-4c8b-4cf8-b3a6-73cb5a8bdc2d</RequestID></Response>'
2023-12-06 12:18:14,591 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ec2.DescribeVpcEndpoints: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x103293b10>>
2023-12-06 12:18:14,592 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2023-12-06 12:18:14,592 - MainThread - botocore.hooks - DEBUG - Event after-call.ec2.DescribeVpcEndpoints: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x109282050>>
2023-12-06 12:18:14,592 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 460, in main
    return command_table[parsed_args.command](remaining, parsed_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 595, in __call__
    return command_table[parsed_args.operation](remaining, parsed_globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 798, in __call__
    return self._operation_caller.invoke(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 931, in invoke
    self._display_response(operation_name, response, parsed_globals)
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/clidriver.py", line 953, in _display_response
    formatter(command_name, response, stream)
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/formatter.py", line 77, in __call__
    response_data = response.build_full_result()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/paginate.py", line 446, in build_full_result
    for response in self:
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/paginate.py", line 252, in __iter__
    response = self._make_request(current_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/paginate.py", line 329, in _make_request
    return self._method(**current_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/awscli/2.14.5/libexec/lib/python3.11/site-packages/awscli/botocore/client.py", line 724, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the DescribeVpcEndpoints operation: Unsupported filter attribute: [service-name]

An error occurred (InvalidParameterValue) when calling the DescribeVpcEndpoints operation: Unsupported filter attribute: [service-name]
RyanFitzSimmonsAK commented 9 months ago

Thanks for your patience. I'm still not able to reproduce the issue (nor my colleague on macOS), but another AWS user reported it as well. I have reached out to the service team about this behavior. In the meantime, could you try this command using Boto3 to check if it's just an issue with the CLI?

RyanFitzSimmonsAK commented 9 months ago

Could you try the following workaround?

In addition to the filter for service-name, customers should also add a filter for vpc-endpoint-type. So if the original command is

aws ec2 describe-vpc-endpoints --filters "Name=service-name,Values=com.amazonaws.us-east-1.s3" --output json

It should now be:

aws ec2 describe-vpc-endpoints --filters Name=service-name,Values=com.amazonaws.us-east-1.s3 Name=vpc-endpoint-type,Values=Interface,Gateway,GatewayLoadBalancer --output json

RyanFitzSimmonsAK commented 7 months ago

This issue was fixed by the service team, and the workaround should no longer be required. If you're still having this problem on the most recent version of the CLI, feel free to reopen the issue.

github-actions[bot] commented 7 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.