aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.56k stars 4.13k forks source link

aws kinesisvideo update-image-generation-configuration --cli-input-json file://./update-image-generation-input.json invalid #7164

Closed xiaoyaodingchunqiu closed 2 years ago

xiaoyaodingchunqiu commented 2 years ago

Describe the bug

galen@galen-RedmiBook-Pro-14S:~/s3cmdtest$ aws kinesisvideo update-image-generation-configuration --cli-input-json file://./update-image-generation-input.json --debug 2022-08-04 09:19:53,707 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.7.20 Python/3.9.11 Linux/5.15.0-25-generic exe/x86_64.ubuntu.22 2022-08-04 09:19:53,708 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['kinesisvideo', 'update-image-generation-configuration', '--cli-input-json', 'file://./update-image-generation-input.json', '--debug'] 2022-08-04 09:19:53,716 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x7f002c0e55e0> 2022-08-04 09:19:53,716 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x7f002c4fe0d0> 2022-08-04 09:19:53,716 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>> 2022-08-04 09:19:53,716 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f002c522670> 2022-08-04 09:19:53,716 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f002c5284c0> 2022-08-04 09:19:53,716 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function alias_opsworks_cm at 0x7f002c0f1f70> 2022-08-04 09:19:53,717 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_history_commands at 0x7f002c448c10> 2022-08-04 09:19:53,717 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.devcommands.CLIDevCommand'>> 2022-08-04 09:19:53,717 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_waiters at 0x7f002c0f11f0> 2022-08-04 09:19:53,717 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.7.20/dist/awscli/data/cli.json 2022-08-04 09:19:53,718 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_types at 0x7f002c1b2ee0> 2022-08-04 09:19:53,718 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function no_sign_request at 0x7f002c1b8a60> 2022-08-04 09:19:53,718 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_verify_ssl at 0x7f002c1b89d0> 2022-08-04 09:19:53,718 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_read_timeout at 0x7f002c1b8b80> 2022-08-04 09:19:53,718 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_connect_timeout at 0x7f002c1b8af0> 2022-08-04 09:19:53,718 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <built-in method update of dict object at 0x7f002bdd5280> 2022-08-04 09:19:53,719 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.7.20 Python/3.9.11 Linux/5.15.0-25-generic exe/x86_64.ubuntu.22 prompt/off 2022-08-04 09:19:53,719 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['kinesisvideo', 'update-image-generation-configuration', '--cli-input-json', 'file://./update-image-generation-input.json', '--debug'] 2022-08-04 09:19:53,719 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x7f002c0e5c10> 2022-08-04 09:19:53,719 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7f002c99d3a0> 2022-08-04 09:19:53,719 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x7f002c0574c0> 2022-08-04 09:19:53,719 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function no_pager_handler at 0x7f002c995790> 2022-08-04 09:19:53,719 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7f002c9001f0> 2022-08-04 09:19:53,720 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/ 2022-08-04 09:19:53,721 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7f002c448af0> 2022-08-04 09:19:53,721 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x7f002c4fbee0> 2022-08-04 09:19:53,728 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.7.20/dist/awscli/botocore/data/kinesisvideo/2017-09-30/service-2.json 2022-08-04 09:19:53,731 - MainThread - botocore.hooks - DEBUG - Event building-command-table.kinesisvideo: calling handler <function add_waiters at 0x7f002c0f11f0> 2022-08-04 09:19:53,739 - MainThread - awscli.clidriver - DEBUG - OrderedDict([('stream-name', <awscli.arguments.CLIArgument object at 0x7f002bd3b580>), ('stream-arn', <awscli.arguments.CLIArgument object at 0x7f002bd3b5b0>), ('image-generation-configuration', <awscli.arguments.CLIArgument object at 0x7f002bd3b5e0>)]) 2022-08-04 09:19:53,739 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.kinesisvideo.update-image-generation-configuration: calling handler <function add_streaming_output_arg at 0x7f002c0e5ee0> 2022-08-04 09:19:53,739 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.kinesisvideo.update-image-generation-configuration: calling handler <function add_cli_input_json at 0x7f002c9009d0> 2022-08-04 09:19:53,739 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.kinesisvideo.update-image-generation-configuration: calling handler <function add_cli_input_yaml at 0x7f002c900c10> 2022-08-04 09:19:53,739 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.kinesisvideo.update-image-generation-configuration: calling handler <function unify_paging_params at 0x7f002c4fe5e0> 2022-08-04 09:19:53,747 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.7.20/dist/awscli/botocore/data/kinesisvideo/2017-09-30/paginators-1.json 2022-08-04 09:19:53,747 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.kinesisvideo.update-image-generation-configuration: calling handler <function add_generate_skeleton at 0x7f002c1b24c0> 2022-08-04 09:19:53,747 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.kinesisvideo.update-image-generation-configuration: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinput.CliInputJSONArgument object at 0x7f002bd3b430>> 2022-08-04 09:19:53,747 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.kinesisvideo.update-image-generation-configuration: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinput.CliInputYAMLArgument object at 0x7f002bd3b2e0>> 2022-08-04 09:19:53,747 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.kinesisvideo.update-image-generation-configuration: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7f002bd3b640>> 2022-08-04 09:19:53,748 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.kinesisvideo.update-image-generation-configuration.stream-name: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f002bd9f2b0> 2022-08-04 09:19:53,748 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.kinesisvideo.update-image-generation-configuration.stream-arn: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f002bd9f2b0> 2022-08-04 09:19:53,748 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.kinesisvideo.update-image-generation-configuration.image-generation-configuration: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f002bd9f2b0> 2022-08-04 09:19:53,748 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.kinesisvideo.update-image-generation-configuration.cli-input-json: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f002bd9f2b0> 2022-08-04 09:19:53,749 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.kinesisvideo.update-image-generation-configuration.cli-input-yaml: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f002bd9f2b0> 2022-08-04 09:19:53,749 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.kinesisvideo.update-image-generation-configuration.generate-cli-skeleton: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f002bd9f2b0> 2022-08-04 09:19:53,749 - MainThread - botocore.hooks - DEBUG - Event calling-command.kinesisvideo.update-image-generation-configuration: calling handler <bound method CliInputArgument.add_to_call_parameters of <awscli.customizations.cliinput.CliInputJSONArgument object at 0x7f002bd3b430>> 2022-08-04 09:19:53,749 - MainThread - botocore.hooks - DEBUG - Event calling-command.kinesisvideo.update-image-generation-configuration: calling handler <bound method CliInputArgument.add_to_call_parameters of <awscli.customizations.cliinput.CliInputYAMLArgument object at 0x7f002bd3b2e0>> 2022-08-04 09:19:53,749 - MainThread - botocore.hooks - DEBUG - Event calling-command.kinesisvideo.update-image-generation-configuration: calling handler <bound method GenerateCliSkeletonArgument.generate_skeleton of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7f002bd3b640>> 2022-08-04 09:19:53,749 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env 2022-08-04 09:19:53,749 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role 2022-08-04 09:19:53,749 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role-with-web-identity 2022-08-04 09:19:53,749 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: sso 2022-08-04 09:19:53,749 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file 2022-08-04 09:19:53,750 - MainThread - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials 2022-08-04 09:19:53,750 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.7.20/dist/awscli/botocore/data/endpoints.json 2022-08-04 09:19:53,760 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f002dd9d5e0> 2022-08-04 09:19:53,761 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.kinesis-video: calling handler <function add_generate_presigned_url at 0x7f002e060dc0> 2022-08-04 09:19:53,764 - MainThread - botocore.endpoint - DEBUG - Setting kinesisvideo timeout as (60, 60) 2022-08-04 09:19:53,765 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.kinesis-video.UpdateImageGenerationConfiguration: calling handler <function base64_decode_input_blobs at 0x7f002c057c10> 2022-08-04 09:19:53,765 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.kinesis-video.UpdateImageGenerationConfiguration: calling handler <function generate_idempotent_uuid at 0x7f002ddb75e0> 2022-08-04 09:19:53,765 - MainThread - botocore.hooks - DEBUG - Event before-call.kinesis-video.UpdateImageGenerationConfiguration: calling handler <function inject_api_version_header_if_needed at 0x7f002ddbbe50> 2022-08-04 09:19:53,765 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=UpdateImageGenerationConfiguration) with params: {'url_path': '/updateImageGenerationConfiguration', 'query_string': {}, 'method': 'POST', 'headers': {'Content-Type': 'application/json', 'User-Agent': 'aws-cli/2.7.20 Python/3.9.11 Linux/5.15.0-25-generic exe/x86_64.ubuntu.22 prompt/off command/kinesisvideo.update-image-generation-configuration'}, 'body': b'{"StreamName": "0803forgetpic", "ImageGenerationConfiguration": {"Status": "ENABLED", "DestinationConfig": {"DestinationRegion": "us-east-1", "Uri": "s3://0803hygetpic"}, "SamplingInterval": 3000, "ImageSelectorType": "PRODUCER_TIMESTAMP", "Format": "JPEG", "FormatConfig": {"JPEGQuality": "80"}, "WidthPixels": 640, "HeightPixels": 480}}', 'url': 'https://kinesisvideo.us-east-1.amazonaws.com/updateImageGenerationConfiguration', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x7f002b1aac10>, 'has_streaming_input': False, 'auth_type': None}} 2022-08-04 09:19:53,765 - MainThread - botocore.hooks - DEBUG - Event request-created.kinesis-video.UpdateImageGenerationConfiguration: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f002b1aabe0>> 2022-08-04 09:19:53,765 - MainThread - botocore.hooks - DEBUG - Event choose-signer.kinesis-video.UpdateImageGenerationConfiguration: calling handler <function set_operation_specific_signer at 0x7f002ddb74c0> 2022-08-04 09:19:53,766 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth. 2022-08-04 09:19:53,766 - MainThread - botocore.auth - DEBUG - CanonicalRequest: POST /updateImageGenerationConfiguration

content-type:application/json host:kinesisvideo.us-east-1.amazonaws.com x-amz-date:20220804T011953Z

content-type;host;x-amz-date 785f072c1c384a8ac23422b5e56fb949df8fc8f9d56fb009e4151477ffb7002d 2022-08-04 09:19:53,766 - MainThread - botocore.auth - DEBUG - StringToSign: AWS4-HMAC-SHA256 20220804T011953Z 20220804/us-east-1/kinesisvideo/aws4_request 3b56a6968001715bee1f3fa8aa24bb8f52d898827fb9b5fa162d5781ea944530 2022-08-04 09:19:53,766 - MainThread - botocore.auth - DEBUG - Signature: e4c686b3af91c7980db01775196956e0783248ba896fbc9481b52e99fe8358ec 2022-08-04 09:19:53,766 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://kinesisvideo.us-east-1.amazonaws.com/updateImageGenerationConfiguration, headers={'Content-Type': b'application/json', 'User-Agent': b'aws-cli/2.7.20 Python/3.9.11 Linux/5.15.0-25-generic exe/x86_64.ubuntu.22 prompt/off command/kinesisvideo.update-image-generation-configuration', 'X-Amz-Date': b'20220804T011953Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAZD6AP7XJTBLZ6WQG/20220804/us-east-1/kinesisvideo/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=e4c686b3af91c7980db01775196956e0783248ba896fbc9481b52e99fe8358ec', 'Content-Length': '338'}> 2022-08-04 09:19:53,766 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/local/aws-cli/v2/2.7.20/dist/awscli/botocore/cacert.pem 2022-08-04 09:19:53,766 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): kinesisvideo.us-east-1.amazonaws.com:443 2022-08-04 09:19:54,728 - MainThread - urllib3.connectionpool - DEBUG - https://kinesisvideo.us-east-1.amazonaws.com:443 "POST /updateImageGenerationConfiguration HTTP/1.1" 200 2 2022-08-04 09:19:54,728 - MainThread - botocore.parsers - DEBUG - Response headers: {'Date': 'Thu, 04 Aug 2022 01:19:54 GMT', 'Content-Type': 'application/json', 'Content-Length': '2', 'Connection': 'keep-alive', 'x-amzn-RequestId': '0b67e707-71a5-4738-8b50-6bba39b5d928'} 2022-08-04 09:19:54,728 - MainThread - botocore.parsers - DEBUG - Response body: b'{}' 2022-08-04 09:19:54,729 - MainThread - botocore.hooks - DEBUG - Event needs-retry.kinesis-video.UpdateImageGenerationConfiguration: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7f002b9f05e0>> 2022-08-04 09:19:54,729 - MainThread - botocore.retries.standard - DEBUG - Not retrying request. 2022-08-04 09:19:54,729 - MainThread - botocore.hooks - DEBUG - Event after-call.kinesis-video.UpdateImageGenerationConfiguration: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x7f002b9f0070>> 2022-08-04 09:19:54,730 - MainThread - awscli.formatter - DEBUG - RequestId: 0b67e707-71a5-4738-8b50-6bba39b5d928 galen@galen-RedmiBook-Pro-14S:~/s3cmdtest$

Expected Behavior

The sampled picture should be transferred to my s3, after video streaming

Current Behavior

there are no picture in my s3

Reproduction Steps

https://docs.aws.amazon.com/zh_cn/kinesisvideostreams/latest/dg/gs-s3Delivery.html aws kinesisvideo update-image-generation-configuration --cli-input-json file://./update-image-generation-input.json --debug see the debug log after video streaming, see whether there is picture in S3

Possible Solution

i don't have ideas

Additional Information/Context

No response

CLI version used

aws-cli/2.7.20 Python/3.9.11 Linux/5.15.0-25-generic exe/x86_64.ubuntu.22 prompt/off

Environment details (OS name and version, etc.)

ubuntu 22.04

xiaoyaodingchunqiu commented 2 years ago

1 { 2 "StreamName": "0803forgetpic", 3 "ImageGenerationConfiguration": 4 { 5 "Status": "ENABLED", 6 "DestinationConfig": 7 { 8 "DestinationRegion": "us-east-1", 9 "Uri": "s3://0803hygetpic" 10 }, 11 "SamplingInterval": 3000, 12 "ImageSelectorType": "PRODUCER_TIMESTAMP", 13 "Format": "JPEG", 14 "FormatConfig": { 15 "JPEGQuality": "80" 16 }, 17 "WidthPixels": 320, 18 "HeightPixels": 240 19 } 20 } there is the info in the update-image-generation-input.json

xiaoyaodingchunqiu commented 2 years ago

1 { 2 "StreamName": "0803forgetpic", 3 "ImageGenerationConfiguration": 4 { 5 "Status": "ENABLED", 6 "DestinationConfig": 7 { 8 "DestinationRegion": "us-east-1", 9 "Uri": "s3://0803hygetpic" 10 }, 11 "SamplingInterval": 3000, 12 "ImageSelectorType": "PRODUCER_TIMESTAMP", 13 "Format": "JPEG", 14 "FormatConfig": { 15 "JPEGQuality": "80" 16 }, 17 "WidthPixels": 320, 18 "HeightPixels": 240 19 } 20 }

tim-finnigan commented 2 years ago

Hi @xiaoyaodingchunqiu thanks for reaching out. I saw you recently opened a related issue here: https://github.com/aws/aws-cli/issues/7159. Is that issue solved now?

xiaoyaodingchunqiu commented 2 years ago

Hi @xiaoyaodingchunqiu thanks for reaching out. I saw you recently opened a related issue here: #7159. Is that issue solved now?

that problem solved but this problem is not solved

tim-finnigan commented 2 years ago

Thanks @xiaoyaodingchunqiu for clarifying that. I didn't see an invalid JSON error in the debug logs that you shared. Could you confirm that the configuration was not updated upon running that command?

tim-finnigan commented 2 years ago

Since we haven't heard back in a few weeks I'm going to close this issue. If you are still affected by this please refer to the comment above and follow up here. Thanks!

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

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. If you wish to keep having a conversation with other community members under this issue feel free to do so.

SaqlainHussainShah commented 1 year ago

I am following this documentation and have executed aws kinesisvideo update-image-generation-configuration \ --cli-input-json file://./update-image-generation-input.json \ inside my cloudshell. It has not given error neither it has outputted anything on S3 bucket. Neither I have anything in cloudwatch related to this. How can I debug? While this is my update image generation json file { "StreamName": "test-stream", "ImageGenerationConfiguration": { "Status": "ENABLED", "DestinationConfig": { "DestinationRegion": "us-east-1", "Uri": "s3://android-kinesis-video-processed" }, "SamplingInterval": 3000, "ImageSelectorType": "PRODUCER_TIMESTAMP", "Format": "JPEG", "FormatConfig": { "JPEGQuality": "80" }, "WidthPixels": 320, "HeightPixels": 240 } } and I am signing in using Cognito user and i have given that cognito role administrator access

SergioBohada99 commented 3 months ago

Facing the same issue, I tried to use the API UpdateImageGenerationConfiguration action, with the following header:

response = kinesis_video_client.update_image_generation_configuration( StreamName='kines.......', ImageGenerationConfiguration={ 'Status': 'ENABLED', 'ImageSelectorType': 'SERVER_TIMESTAMP', 'DestinationConfig': { 'Uri': 's3://ele......., 'DestinationRegion': 'us-east-2' }, 'Format': 'JPEG', 'SamplingInterval': 3000 } )

Response is the following from end-point: {'ResponseMetadata': {'RequestId': 'f03ff189-9059-4f74-a190-b31a6c6950e2', 'HTTPStatusCode': 200, 'HTTPHeaders': {'date': 'Wed, 31 Jul 2024 22:18:49 GMT', 'content-type': 'application/json', 'content-length': '2', 'connection': 'keep-alive', 'x-amzn-requestid': 'f03ff189-9059-4f74-a190-b31a6c6950e2'}, 'RetryAttempts': 0}}

But I'm not getting any images in the S3 bucket.