aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.43k stars 4.09k forks source link

aws ssm list-command-invocations: filtering on DocumentName doesn't work #3707

Closed nmaquet closed 5 years ago

nmaquet commented 5 years ago

Steps to reproduce:

aws ssm list-command-invocations --filter key=DocumentName,value=X 

Example output:

{
    "CommandInvocations": [
        {
            "CommandId": "...",
            "InstanceId": "...",
            "InstanceName": "...",
            "Comment": "",
            "DocumentName": "AmazonInspector-ManageAWSAgent",
            "DocumentVersion": "$DEFAULT",
            "RequestedDateTime": 1541651026.276,
            "Status": "Success",
            "StatusDetails": "Success"
        }
     ]
}

The command seems to completely ignore filters for key=DocumentName. No matter which value I pass, the output is always the same. Also Boto3 has the exact same behaviour.

$ aws --version
aws-cli/1.16.50 Python/3.7.0 Darwin/17.7.0 botocore/1.12.40
justnance commented 5 years ago

@nmaquet - Thanks for reaching out. I was unable to reproduce the same problem under cli v 1.16.50. Please provide the santized output using the --debug so we can analyze want is happening.

aws ssm list-command-invocations --filter key=DocumentName,value=X --debug

nmaquet commented 5 years ago

@justnance Thanks for looking into this. Here's the output when passing --debug:

2018-11-13 22:52:22,908 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.16.50 Python/3.7.0 Darwin/17.7.0 botocore/1.12.40
2018-11-13 22:52:22,909 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['--region', 'eu-west-1', 'ssm', 'list-command-invocations', '--filter', 'key=DocumentName,value=X', '--debug']
2018-11-13 22:52:22,909 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x1102f7378>
2018-11-13 22:52:22,909 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x10f9d2730>
2018-11-13 22:52:22,910 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x10fe01510>
2018-11-13 22:52:22,918 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x110083b70>
2018-11-13 22:52:22,919 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/lib/python3.7/site-packages/botocore/data/ssm/2014-11-06/service-2.json
2018-11-13 22:52:22,929 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.ssm: calling handler <function register_retries_for_service at 0x10f50ba60>
2018-11-13 22:52:22,929 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: ssm
2018-11-13 22:52:22,932 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ssm: calling handler <function add_custom_start_session at 0x110313620>
2018-11-13 22:52:22,932 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.ssm: calling handler <function register_retries_for_service at 0x10f50ba60>
2018-11-13 22:52:22,932 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: ssm
2018-11-13 22:52:22,933 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ssm: calling handler <function add_waiters at 0x1102fb620>
2018-11-13 22:52:22,941 - MainThread - awscli.clidriver - DEBUG - OrderedDict([('command-id', <awscli.arguments.CLIArgument object at 0x110f315c0>), ('instance-id', <awscli.arguments.CLIArgument object at 0x110f367b8>), ('max-results', <awscli.arguments.CLIArgument object at 0x110f367f0>), ('next-token', <awscli.arguments.CLIArgument object at 0x110f36828>), ('filters', <awscli.arguments.ListArgument object at 0x110f36860>), ('details', <awscli.arguments.BooleanArgument object at 0x110f36908>), ('no-details', <awscli.arguments.BooleanArgument object at 0x10ea20710>)])
2018-11-13 22:52:22,941 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ssm.list-command-invocations: calling handler <function add_streaming_output_arg at 0x1102f78c8>
2018-11-13 22:52:22,941 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ssm.list-command-invocations: calling handler <function add_cli_input_json at 0x10fe01a60>
2018-11-13 22:52:22,941 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ssm.list-command-invocations: calling handler <function unify_paging_params at 0x110276620>
2018-11-13 22:52:22,948 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/lib/python3.7/site-packages/botocore/data/ssm/2014-11-06/paginators-1.json
2018-11-13 22:52:22,949 - MainThread - awscli.customizations.paginate - DEBUG - Modifying paging parameters for operation: ListCommandInvocations
2018-11-13 22:52:22,949 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.ssm.list-command-invocations: calling handler <function add_generate_skeleton at 0x11025b378>
2018-11-13 22:52:22,950 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.ssm.list-command-invocations: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x110f36940>>
2018-11-13 22:52:22,950 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.ssm.list-command-invocations: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x110f3bbe0>>
2018-11-13 22:52:22,951 - MainThread - botocore.hooks - DEBUG - Event operation-args-parsed.ssm.list-command-invocations: calling handler functools.partial(<function check_should_enable_pagination at 0x110276730>, ['next-token', 'max-results'], {}, OrderedDict([('command-id', <awscli.arguments.CLIArgument object at 0x110f315c0>), ('instance-id', <awscli.arguments.CLIArgument object at 0x110f367b8>), ('max-results', <awscli.arguments.CLIArgument object at 0x110f367f0>), ('next-token', <awscli.arguments.CLIArgument object at 0x110f36828>), ('filters', <awscli.arguments.ListArgument object at 0x110f36860>), ('details', <awscli.arguments.BooleanArgument object at 0x110f36908>), ('no-details', <awscli.arguments.BooleanArgument object at 0x10ea20710>), ('cli-input-json', <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x110f36940>), ('starting-token', <awscli.customizations.paginate.PageArgument object at 0x110f369b0>), ('page-size', <awscli.customizations.paginate.PageArgument object at 0x110f3ba58>), ('max-items', <awscli.customizations.paginate.PageArgument object at 0x110f3bb00>), ('generate-cli-skeleton', <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x110f3bbe0>)]))
2018-11-13 22:52:22,951 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.command-id: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,952 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.instance-id: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,952 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.max-results: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,952 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.next-token: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,952 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.filters: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,952 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.ssm.list-command-invocations: calling handler <awscli.argprocess.ParamShorthandParser object at 0x10f9c1c88>
2018-11-13 22:52:22,952 - MainThread - awscli.argprocess - DEBUG - Parsing param --filters as shorthand
2018-11-13 22:52:22,953 - MainThread - awscli.arguments - DEBUG - Unpacked value of ['key=DocumentName,value=X'] for parameter "filters": [{'key': 'DocumentName', 'value': 'X'}]
2018-11-13 22:52:22,953 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.details: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,953 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.cli-input-json: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,953 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.starting-token: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,953 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.page-size: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,953 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.max-items: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,954 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.ssm.list-command-invocations.generate-cli-skeleton: calling handler <awscli.paramfile.URIArgumentHandler object at 0x1103c1da0>
2018-11-13 22:52:22,954 - MainThread - botocore.hooks - DEBUG - Event calling-command.ssm.list-command-invocations: calling handler <bound method CliInputJSONArgument.add_to_call_parameters of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x110f36940>>
2018-11-13 22:52:22,954 - MainThread - botocore.hooks - DEBUG - Event calling-command.ssm.list-command-invocations: calling handler <bound method GenerateCliSkeletonArgument.generate_json_skeleton of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x110f3bbe0>>
2018-11-13 22:52:22,954 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2018-11-13 22:52:22,954 - MainThread - botocore.credentials - INFO - Found credentials in environment variables.
2018-11-13 22:52:22,954 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/lib/python3.7/site-packages/botocore/data/endpoints.json
2018-11-13 22:52:22,957 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x10f4eff28>
2018-11-13 22:52:22,960 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.ssm: calling handler <function add_generate_presigned_url at 0x10f4b4950>
2018-11-13 22:52:22,961 - MainThread - botocore.args - DEBUG - The s3 config key is not a dictionary type, ignoring its value of: None
2018-11-13 22:52:22,966 - MainThread - botocore.endpoint - DEBUG - Setting ssm timeout as (60, 60)
2018-11-13 22:52:22,967 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: ssm
2018-11-13 22:52:22,970 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.ssm.ListCommandInvocations: calling handler <function generate_idempotent_uuid at 0x10f50b400>
2018-11-13 22:52:22,970 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=ListCommandInvocations) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'X-Amz-Target': 'AmazonSSM.ListCommandInvocations', 'Content-Type': 'application/x-amz-json-1.1', 'User-Agent': 'aws-cli/1.16.50 Python/3.7.0 Darwin/17.7.0 botocore/1.12.40'}, 'body': b'{"Filters": [{"key": "DocumentName", "value": "X"}]}', 'url': 'https://ssm.eu-west-1.amazonaws.com/', 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x11108a0b8>, 'has_streaming_input': False, 'auth_type': None}}
2018-11-13 22:52:22,970 - MainThread - botocore.hooks - DEBUG - Event request-created.ssm.ListCommandInvocations: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x11108a080>>
2018-11-13 22:52:22,971 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ssm.ListCommandInvocations: calling handler <function set_operation_specific_signer at 0x10f50b2f0>
2018-11-13 22:52:22,971 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2018-11-13 22:52:22,971 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-amz-json-1.1
host:ssm.eu-west-1.amazonaws.com
x-amz-date:20181113T095222Z
x-amz-target:AmazonSSM.ListCommandInvocations

content-type;host;x-amz-date;x-amz-target
142d3f23e9de3d7b73290ee01b9f17860e0600aa8f1c3cc231d5271b79d60fb2
2018-11-13 22:52:22,971 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20181113T095222Z
20181113/eu-west-1/ssm/aws4_request
00882d2aea3e9cbfe8c4289ec9e638bacd57adefc46110e5499449157c3c6b4f
2018-11-13 22:52:22,971 - MainThread - botocore.auth - DEBUG - Signature:
4aba67d40b909558fc9cbc8b5d8c794a32ae889391be86891c7b6f73f51a8063
2018-11-13 22:52:22,972 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ssm.eu-west-1.amazonaws.com/, headers={'X-Amz-Target': b'AmazonSSM.ListCommandInvocations', 'Content-Type': b'application/x-amz-json-1.1', 'User-Agent': b'aws-cli/1.16.50 Python/3.7.0 Darwin/17.7.0 botocore/1.12.40', 'X-Amz-Date': b'20181113T095222Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=<REDACTED>/20181113/eu-west-1/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=<REDACTED>', 'Content-Length': '52'}>
2018-11-13 22:52:24,954 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amzn-RequestId': 'c9a7c144-8656-4683-af21-2335740ced0d', 'Content-Type': 'application/x-amz-json-1.1', 'Content-Length': '13534', 'Date': 'Tue, 13 Nov 2018 09:52:23 GMT'}
2018-11-13 22:52:24,954 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"CommandInvocations":[{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"8309b4ae-a470-48fe-90b2-91e87b3e9bf3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542094617561E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"4cd8154a-ab72-45ea-9769-c88837b8b58e","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542081640749E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"4cd8154a-ab72-45ea-9769-c88837b8b58e","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542081640688E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"5735c60b-92f9-4066-893e-370e6ee9b7b3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541995208762E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"5735c60b-92f9-4066-893e-370e6ee9b7b3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541995208699E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"5735c60b-92f9-4066-893e-370e6ee9b7b3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541995208571E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"5735c60b-92f9-4066-893e-370e6ee9b7b3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541995208491E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"1dd03707-ba19-4195-af6a-bc1420c7e787","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541992493965E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"d90acd7c-2e59-473f-b9da-bf15f5deb788","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.54199153504E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"d90acd7c-2e59-473f-b9da-bf15f5deb788","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541991534977E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"d90acd7c-2e59-473f-b9da-bf15f5deb788","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541991534703E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"69cf7c3b-78aa-43d8-abff-8e9bf90e480a","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541934672703E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"69cf7c3b-78aa-43d8-abff-8e9bf90e480a","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541934672622E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"dc5f2f21-c5db-4d34-a009-6441ab563ab2","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541848244299E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"dc5f2f21-c5db-4d34-a009-6441ab563ab2","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541848244219E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"dc5f2f21-c5db-4d34-a009-6441ab563ab2","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541848244137E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"52fdf0fd-c87a-46aa-94de-3793aba8ef76","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541761816494E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"52fdf0fd-c87a-46aa-94de-3793aba8ef76","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541761816338E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"52fdf0fd-c87a-46aa-94de-3793aba8ef76","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541761816257E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"68928aa3-3076-42ac-9aaf-038a24a5652b","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541675387864E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"68928aa3-3076-42ac-9aaf-038a24a5652b","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541675387781E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"68928aa3-3076-42ac-9aaf-038a24a5652b","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541675387694E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"68928aa3-3076-42ac-9aaf-038a24a5652b","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541675387475E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Failed","StatusDetails":"Failed"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"2b748267-0337-4770-b476-de2563206b9b","CommandPlugins":[],"Comment":"","DocumentName":"AmazonInspector-ManageAWSAgent","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541651026215E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"2b748267-0337-4770-b476-de2563206b9b","CommandPlugins":[],"Comment":"","DocumentName":"AmazonInspector-ManageAWSAgent","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541651026104E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"}],"NextToken":"AAEAAr3MAhUDjFMyv6Erm92uhcFJ636hY7DldHg3c1yL+nZIAAAAAFvqnth2M6UgNTq7MmIV2tMnXqenDKQAt1y4lQpigVI4A8DBD9PLvj5tEaUZqMrBoiZ9MHAtjtzRH521VL+dCfiDMjEj9fff9vP2Mk6WF3cZaPMMnLYw9IUsJ5aEuRzg/URLgm87b86cf4jRO7Bg7jkH3IToHeFzduVRKDTyPaC/XRXzbGE/oOWigVmT50OOAV9aDAmpdhbbJ4CAvshZoz8a5oBMNr1af2Zm0OE8JEXslU8lBndkwvlUle8Qnen1SWnnUZG6f/xc/0dFRzx35rohdScBHvFr3NLwxAq/Oga9Ij1MCHcX8j6P8XqlcQGAACM4EXdz4LAM0HV25jUv6b4B52b6Pa7b/oW3QLDiI0jdRgzDqJ+4geBEGeWKdvcT76cKDgrT+ZZcEtU8eg+wyg+EBfF8/CR6+TgIG88LOUj0ju2jdJgSRu7CajdcmYuVATJhyYe1bDQty6CEhHYcHRDrTisL"}'
2018-11-13 22:52:24,973 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ssm.ListCommandInvocations: calling handler <botocore.retryhandler.RetryHandler object at 0x110ef2b38>
2018-11-13 22:52:24,973 - MainThread - botocore.retryhandler - DEBUG - No retry needed.
2018-11-13 22:52:24,974 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.ssm.ListCommandInvocations: calling handler <function generate_idempotent_uuid at 0x10f50b400>
2018-11-13 22:52:24,974 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=ListCommandInvocations) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'X-Amz-Target': 'AmazonSSM.ListCommandInvocations', 'Content-Type': 'application/x-amz-json-1.1', 'User-Agent': 'aws-cli/1.16.50 Python/3.7.0 Darwin/17.7.0 botocore/1.12.40'}, 'body': b'{"Filters": [{"key": "DocumentName", "value": "X"}], "NextToken": "AAEAAr3MAhUDjFMyv6Erm92uhcFJ636hY7DldHg3c1yL+nZIAAAAAFvqnth2M6UgNTq7MmIV2tMnXqenDKQAt1y4lQpigVI4A8DBD9PLvj5tEaUZqMrBoiZ9MHAtjtzRH521VL+dCfiDMjEj9fff9vP2Mk6WF3cZaPMMnLYw9IUsJ5aEuRzg/URLgm87b86cf4jRO7Bg7jkH3IToHeFzduVRKDTyPaC/XRXzbGE/oOWigVmT50OOAV9aDAmpdhbbJ4CAvshZoz8a5oBMNr1af2Zm0OE8JEXslU8lBndkwvlUle8Qnen1SWnnUZG6f/xc/0dFRzx35rohdScBHvFr3NLwxAq/Oga9Ij1MCHcX8j6P8XqlcQGAACM4EXdz4LAM0HV25jUv6b4B52b6Pa7b/oW3QLDiI0jdRgzDqJ+4geBEGeWKdvcT76cKDgrT+ZZcEtU8eg+wyg+EBfF8/CR6+TgIG88LOUj0ju2jdJgSRu7CajdcmYuVATJhyYe1bDQty6CEhHYcHRDrTisL"}', 'url': 'https://ssm.eu-west-1.amazonaws.com/', 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x11108a0b8>, 'has_streaming_input': False, 'auth_type': None}}
2018-11-13 22:52:24,974 - MainThread - botocore.hooks - DEBUG - Event request-created.ssm.ListCommandInvocations: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x11108a080>>
2018-11-13 22:52:24,975 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ssm.ListCommandInvocations: calling handler <function set_operation_specific_signer at 0x10f50b2f0>
2018-11-13 22:52:24,975 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2018-11-13 22:52:24,975 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

content-type:application/x-amz-json-1.1
host:ssm.eu-west-1.amazonaws.com
x-amz-date:20181113T095224Z
x-amz-target:AmazonSSM.ListCommandInvocations

content-type;host;x-amz-date;x-amz-target
c4db67f757fc7285f8830c6710799a579dc5f0c71755e84afa81e635f3187c59
2018-11-13 22:52:24,975 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20181113T095224Z
20181113/eu-west-1/ssm/aws4_request
13d5fdebe70ec5d865354fca4a7439fb6a5c0315d466c8d7df9e2f0979753e67
2018-11-13 22:52:24,975 - MainThread - botocore.auth - DEBUG - Signature:
4dcd66c1dc807671d44d8373c51150d41632b5cb4948f2f59ba121694c20344f
2018-11-13 22:52:24,976 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://ssm.eu-west-1.amazonaws.com/, headers={'X-Amz-Target': b'AmazonSSM.ListCommandInvocations', 'Content-Type': b'application/x-amz-json-1.1', 'User-Agent': b'aws-cli/1.16.50 Python/3.7.0 Darwin/17.7.0 botocore/1.12.40', 'X-Amz-Date': b'20181113T095224Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=<REDACTED>/20181113/eu-west-1/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=<REDACTED>', 'Content-Length': '597'}>
2018-11-13 22:52:25,875 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amzn-RequestId': 'e7509ec4-afc8-4285-a9b8-e0315374ea49', 'Content-Type': 'application/x-amz-json-1.1', 'Content-Length': '11441', 'Date': 'Tue, 13 Nov 2018 09:52:24 GMT'}
2018-11-13 22:52:25,876 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"CommandInvocations":[{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"8309b4ae-a470-48fe-90b2-91e87b3e9bf3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542094617864E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"8309b4ae-a470-48fe-90b2-91e87b3e9bf3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542094617787E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"8309b4ae-a470-48fe-90b2-91e87b3e9bf3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542094617709E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"8309b4ae-a470-48fe-90b2-91e87b3e9bf3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542094617636E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"4cd8154a-ab72-45ea-9769-c88837b8b58e","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.54208164084E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"4cd8154a-ab72-45ea-9769-c88837b8b58e","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542081640614E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"4cd8154a-ab72-45ea-9769-c88837b8b58e","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.542081640523E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"5735c60b-92f9-4066-893e-370e6ee9b7b3","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541995208635E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"ae6630ed-00a8-498f-9c0f-487b8afbe76e","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541992352716E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"d90acd7c-2e59-473f-b9da-bf15f5deb788","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541991534874E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"d90acd7c-2e59-473f-b9da-bf15f5deb788","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541991534797E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"69cf7c3b-78aa-43d8-abff-8e9bf90e480a","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.54193467254E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"69cf7c3b-78aa-43d8-abff-8e9bf90e480a","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541934672457E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"69cf7c3b-78aa-43d8-abff-8e9bf90e480a","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.54193467236E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Failed","StatusDetails":"Failed"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"dc5f2f21-c5db-4d34-a009-6441ab563ab2","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541848244051E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"dc5f2f21-c5db-4d34-a009-6441ab563ab2","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541848243964E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Failed","StatusDetails":"Failed"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"52fdf0fd-c87a-46aa-94de-3793aba8ef76","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-c2ae174e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541761816417E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"52fdf0fd-c87a-46aa-94de-3793aba8ef76","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541761816171E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Failed","StatusDetails":"Failed"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"68928aa3-3076-42ac-9aaf-038a24a5652b","CommandPlugins":[],"Comment":"","DocumentName":"AWS-RunPatchBaseline","DocumentVersion":"$DEFAULT","InstanceId":"i-82069b0e","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541675387611E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"2b748267-0337-4770-b476-de2563206b9b","CommandPlugins":[],"Comment":"","DocumentName":"AmazonInspector-ManageAWSAgent","DocumentVersion":"$DEFAULT","InstanceId":"i-fb2e7573","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541651026276E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"2b748267-0337-4770-b476-de2563206b9b","CommandPlugins":[],"Comment":"","DocumentName":"AmazonInspector-ManageAWSAgent","DocumentVersion":"$DEFAULT","InstanceId":"i-8ebfcc04","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541651026157E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"},{"CloudWatchOutputConfig":{"CloudWatchLogGroupName":"","CloudWatchOutputEnabled":false},"CommandId":"2b748267-0337-4770-b476-de2563206b9b","CommandPlugins":[],"Comment":"","DocumentName":"AmazonInspector-ManageAWSAgent","DocumentVersion":"$DEFAULT","InstanceId":"i-7d1e80d0","InstanceName":"","NotificationConfig":{"NotificationArn":"","NotificationEvents":[],"NotificationType":""},"RequestedDateTime":1.541651026034E9,"ServiceRole":"","StandardErrorUrl":"","StandardOutputUrl":"","Status":"Success","StatusDetails":"Success"}]}'
2018-11-13 22:52:25,879 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ssm.ListCommandInvocations: calling handler <botocore.retryhandler.RetryHandler object at 0x110ef2b38>
2018-11-13 22:52:25,879 - MainThread - botocore.retryhandler - DEBUG - No retry needed.
nmaquet commented 5 years ago

@justnance Did the output help in any way?

justnance commented 5 years ago

@nmaquet - Thank you for your patience and providing the debug logs. It appears the filters for key=DocumentName is not being ignored. The command aws ssm list-command-invocations --filter key=DocumentName,value=X is being recognized as shorthand:

2018-11-13 22:52:22,952 - MainThread - awscli.argprocess - DEBUG - Parsing param --filters as shorthand

As such, can you please try to use the Generate CLI Skeleton and CLI Input JSON Parameters method instead of the shorthand method and see if it returns different results?

justnance commented 5 years ago

@nmaquet - I just want to add a bit more information about the findings in the debug logs. The request is sending the correct parameters and in the correct format indicating the shorthand is translating it correctly as: {"Filters": [{"key": "DocumentName", "value": "X"}]. It also appears to be resolving the typo from filter to filters.

Making the Request 2018-11-13 22:52:22,970 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=ListCommandInvocations) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'X-Amz-Target': 'AmazonSSM.ListCommandInvocations', 'Content-Type': 'application/x-amz-json-1.1', 'User-Agent': 'aws-cli/1.16.50 Python/3.7.0 Darwin/17.7.0 botocore/1.12.40'}, 'body': b'{"Filters": [{"key": "DocumentName", "value": "X"}]}', 'url': 'https://ssm.eu-west-1.amazonaws.com/', 'context': {'client_region': 'eu-west-1', 'client_config': <botocore.config.Config object at 0x11108a0b8>, 'has_streaming_input': False, 'auth_type': None}}

Next, I re-analyzed the output after the Response body: and was able to collaborate with Premium Support using one of the instance ID. It appears all is working as expected with except for the expected output. I collaborated with Premium Support to find out how many resources were subject to {"Filters": [{"key": "DocumentName", "value": "X"}] to determine what data was missing or incorrect but it appears tags with the "value": "X" no longer exist.

Please rerun the command using filters as opposed to filter to confirm that is not the root cause is not due to a typo. It is possible you may need to reach out and open a case with Premium Support to troubleshoot SSM issues as it appears the CLI is returning the output provided by the service.

no-response[bot] commented 5 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.