question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[KinesisVideoSignaling] Calling get_ice_server_config() throws UnknownOperationException

See original GitHub issue

Describe the bug

Calling:  client.get_ice_server_config() throws an <UnknownOperationException>

Steps to reproduce

import boto3
# Trying to retrieve ICE server config
channelArn = 'some_channel_arn'
client = boto3.client('kinesis-video-signaling')

response = client.get_ice_server_config(
    ChannelARN = channelArn
)

Expected behavior Returns a list of ICE servers as described in SDK

Debug logs

2021-06-25 19:22:13,260 botocore.loaders [DEBUG] Loading JSON file: /usr/local/lib/python3.9/site-packages/botocore/data/kinesis-video-signaling/2019-12-04/service-2.json
2021-06-25 19:22:13,260 botocore.hooks [DEBUG] Event creating-client-class.kinesis-video-signaling: calling handler <function add_generate_presigned_url at 0x1080981f0>
2021-06-25 19:22:13,263 botocore.endpoint [DEBUG] Setting kinesisvideo timeout as (60, 60)
2021-06-25 19:22:13,263 botocore.client [DEBUG] Registering retry handlers for service: kinesis-video-signaling
2021-06-25 19:22:13,264 botocore.hooks [DEBUG] Event before-parameter-build.kinesis-video-signaling.GetIceServerConfig: calling handler <function generate_idempotent_uuid at 0x1081170d0>
2021-06-25 19:22:13,264 botocore.hooks [DEBUG] Event before-call.kinesis-video-signaling.GetIceServerConfig: calling handler <function inject_api_version_header_if_needed at 0x108118940>
2021-06-25 19:22:13,264 botocore.endpoint [DEBUG] Making request for OperationModel(name=GetIceServerConfig) with params: {'url_path': '/v1/get-ice-server-config', 'query_string': {}, 'method': 'POST', 'headers': {'User-Agent': 'Boto3/1.17.100 Python/3.9.5 Darwin/20.3.0 Botocore/1.20.100'}, 'body': b'{"ChannelARN": "arn:aws:kinesisvideo:us-east-1:292685929118:channel/Test/1624524192976"}', 'url': 'https://kinesisvideo.us-east-1.amazonaws.com/v1/get-ice-server-config', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x108662d00>, 'has_streaming_input': False, 'auth_type': None}}
2021-06-25 19:22:13,264 botocore.hooks [DEBUG] Event request-created.kinesis-video-signaling.GetIceServerConfig: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x108662c40>>
2021-06-25 19:22:13,264 botocore.hooks [DEBUG] Event choose-signer.kinesis-video-signaling.GetIceServerConfig: calling handler <function set_operation_specific_signer at 0x108110f70>
2021-06-25 19:22:13,265 botocore.auth [DEBUG] Calculating signature using v4 auth.
2021-06-25 19:22:13,265 botocore.auth [DEBUG] CanonicalRequest:
POST
/v1/get-ice-server-config

host:kinesisvideo.us-east-1.amazonaws.com
x-amz-date:20210625T172213Z

host;x-amz-date
fd73172d62c92d37421dd724e6b8275378d2f22d43089733bb180762cd6968fa
2021-06-25 19:22:13,265 botocore.auth [DEBUG] StringToSign:
AWS4-HMAC-SHA256
20210625T172213Z
20210625/us-east-1/kinesisvideo/aws4_request
74ef55af5ea7006d18845459fefbaed407a304f41eb72a4beae79dc354cbff27
2021-06-25 19:22:13,265 botocore.auth [DEBUG] Signature:
5cea4e9c53d5c9a32e5d2b83075ae3923f59e7ce854d27df218565e919f3364a
2021-06-25 19:22:13,265 botocore.endpoint [DEBUG] Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://kinesisvideo.us-east-1.amazonaws.com/v1/get-ice-server-config, headers={'User-Agent': b'Boto3/1.17.100 Python/3.9.5 Darwin/20.3.0 Botocore/1.20.100', 'X-Amz-Date': b'20210625T172213Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUIJLQ3KPHWMJYOO7/20210625/us-east-1/kinesisvideo/aws4_request, SignedHeaders=host;x-amz-date, Signature=5cea4e9c53d5c9a32e5d2b83075ae3923f59e7ce854d27df218565e919f3364a', 'Content-Length': '88'}>
2021-06-25 19:22:13,265 botocore.httpsession [DEBUG] Certificate path: /usr/local/lib/python3.9/site-packages/botocore/cacert.pem
2021-06-25 19:22:13,266 urllib3.connectionpool [DEBUG] Starting new HTTPS connection (1): kinesisvideo.us-east-1.amazonaws.com:443
2021-06-25 19:22:13,766 urllib3.connectionpool [DEBUG] https://kinesisvideo.us-east-1.amazonaws.com:443 "POST /v1/get-ice-server-config HTTP/1.1" 404 29
2021-06-25 19:22:13,767 botocore.parsers [DEBUG] Response headers: {'x-amzn-RequestId': 'c9df8706-c0b7-4392-beef-46831b5a3a94', 'Content-Length': '29', 'Date': 'Fri, 25 Jun 2021 17:22:13 GMT'}
2021-06-25 19:22:13,767 botocore.parsers [DEBUG] Response body:
b'<UnknownOperationException/>\n'
2021-06-25 19:22:13,768 botocore.hooks [DEBUG] Event needs-retry.kinesis-video-signaling.GetIceServerConfig: calling handler <botocore.retryhandler.RetryHandler object at 0x1086af490>
2021-06-25 19:22:13,768 botocore.retryhandler [DEBUG] No retry needed.
Traceback (most recent call last):
  File "/Users/randomname/Desktop/work/some-project/amazon-kinesis-video-streams-python/test.py", line 28, in <module>
    response = client2.get_ice_server_config(
  File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 386, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 705, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (404) when calling the GetIceServerConfig operation: <UnknownOperationException/>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
snhappiestbabycommented, Jun 25, 2021

Explicitly changing endpoint url in client fixes the issue:

import boto3

session = boto3.Session()
client = session.client('kinesisvideo')
response = client.get_signaling_channel_endpoint(
    ChannelARN = 'some_channel_arn',
    SingleMasterChannelEndpointConfiguration = {
        'Protocols': ['HTTPS'],
        'Role': 'MASTER',
    }
)

httpEndpoint = response["ResourceEndpointList"][0]["ResourceEndpoint"]

client = session.client('kinesis-video-signaling', endpoint_url=httpEndpoint)
response = client.get_ice_server_config(
    ChannelARN = 'some_channel_arn'
)

I would still mark this as a problem as this kind of workaround wasn’t needed in Javascript and Go SDK.

0reactions
satyajit-inkcommented, Feb 4, 2022

Explicitly changing endpoint url in client fixes the issue:

import boto3

session = boto3.Session()
client = session.client('kinesisvideo')
response = client.get_signaling_channel_endpoint(
    ChannelARN = 'some_channel_arn',
    SingleMasterChannelEndpointConfiguration = {
        'Protocols': ['HTTPS'],
        'Role': 'MASTER',
    }
)

httpEndpoint = response["ResourceEndpointList"][0]["ResourceEndpoint"]

client = session.client('kinesis-video-signaling', endpoint_url=httpEndpoint)
response = client.get_ice_server_config(
    ChannelARN = 'some_channel_arn'
)

I would still mark this as a problem as this kind of workaround wasn’t needed in Javascript and Go SDK.

Thanks ! this works perfect 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

GetIceServerConfig - Amazon Kinesis Video Streams
Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, user name, and password which can be used to ...
Read more >
kinesisvideosignaling - Go Packages
Package kinesisvideosignaling provides the API client, operations, and parameter types for Amazon Kinesis Video Signaling Channels.
Read more >
@aws-sdk/client-kinesis-video-signaling - npm
Call send operation on client with command object as input. If you are using a custom http handler, you may call destroy() to...
Read more >
aws kinesis-video-signaling get-ice-server-config - Fig.io
aws kinesis-video-signaling get-ice-server-config. Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, ...
Read more >
get-ice-server-config — AWS CLI 2.9.6 Command Reference
[ aws . kinesis-video-signaling ]. get-ice-server-config¶. Description¶. Gets the Interactive Connectivity Establishment (ICE) server configuration ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found