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.

AWS Kinesis Video Stream - Not accessible across region

See original GitHub issue

I am trying to use Kinesis Video Stream in US East Region. Here is the error:

I tried from my local laptop sitting in Australia:

>>> import boto3
>>> client = boto3.client('kinesisvideo')
>>> response = client.list_streams()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/client.py", line 320, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/client.py", line 610, in _make_api_call
    operation_model, request_dict)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/endpoint.py", line 102, in make_request
    return self._send_request(request_dict, operation_model)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/endpoint.py", line 136, in _send_request
    success_response, exception):
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/endpoint.py", line 210, in _needs_retry
    caught_exception=caught_exception, request_dict=request_dict)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/hooks.py", line 356, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/hooks.py", line 211, in _emit
    response = handler(**kwargs)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/retryhandler.py", line 183, in __call__
    if self._checker(attempts, response, caught_exception):
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/retryhandler.py", line 251, in __call__
    caught_exception)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/retryhandler.py", line 277, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/retryhandler.py", line 317, in __call__
    caught_exception)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/retryhandler.py", line 223, in __call__
    attempt_number, caught_exception)
  File "/Users/ayan/workspace/virenvs/rekognition/lib/python2.7/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
    raise caught_exception
botocore.exceptions.ConnectionClosedError: Connection was closed before we received a valid response from endpoint URL: "https://kinesisvideo.us-east-1.amazonaws.com/listStreams".

>>> 

Now, my first thought is Proxy. Though I know I am not using Proxy, I wanted to test. So in the same Python session I opened a DynamoDB session and it works file (As you can see I am using default region in both client calls, so the region is same)

>>> client = boto3.client('dynamodb')
>>> response = client.list_tables()
>>> response
{'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': 'B482K6CS533EBNHII70LP5S433VV4KQNSO5AEMVJF66Q9ASUAAJG', 'HTTPHeaders': {'x-amzn-requestid': 'B482K6CS533EBNHII70LP5S433VV4KQNSO5AEMVJF66Q9ASUAAJG', 'content-length': '58', 'server': 'Server', 'connection': 'keep-alive', 'x-amz-crc32': '1578827374', 'date': 'Tue, 06 Nov 2018 12:22:58 GMT', 'content-type': 'application/x-amz-json-1.0'}}, u'TableNames': [u'reference', u'run_status', u'sagemakerProps']}

Okay, so what next? I launched an EC2 in us-east-1 and tried this:

>>> import boto3
>>> client = boto3.client('kinesisvideo')
>>> response = client.list_streams()
>>> response
{u'StreamInfoList': [{u'Status': u'ACTIVE', u'StreamName': u'rekognitionStream1', u'CreationTime': datetime.datetime(2018, 11, 6, 12, 15, 39, 420000, tzinfo=tzlocal()), u'MediaType': u'video/h264', u'Version': u'9vVjpxmqoNGQqpR2KrKd', u'StreamARN': u'arn:aws:kinesisvideo:us-east-1:882790899507:stream/rekognitionStream1/1541506539420', u'KmsKeyId': u'arn:aws:kms:us-east-1:882790899507:alias/aws/kinesisvideo', u'DataRetentionInHours': 0}], 'ResponseMetadata': {'RetryAttempts': 0, 'HTTPStatusCode': 200, 'RequestId': '9229b236-7fb4-4fb1-b9c0-7d033035820b', 'HTTPHeaders': {'x-amzn-requestid': '9229b236-7fb4-4fb1-b9c0-7d033035820b', 'date': 'Tue, 06 Nov 2018 12:37:37 GMT', 'content-length': '392', 'content-type': 'application/json'}}}
>>> 

Voila!! It worked!!

So my conclusion is boto3 client for kinesis video does not work from other regions!!

Any workaround?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
no-response[bot]commented, Jan 12, 2019

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.

1reaction
no-response[bot]commented, Nov 27, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Kinesis Video Streams - AWS Documentation
Describes issue symptoms and resolutions for Kinesis Video Streams. ... This error might occur if connectivity or permissions are not available to the ......
Read more >
How to access Kinesis Video Streams data - Amazon Connect
You must have developer skills to work with Kinesis Video Streams data. ... Regions; import com.amazonaws.services.kinesisvideo.model.
Read more >
Amazon Kinesis Video Streams FAQs
Read frequently asked questions about Amazon Kinesis Video Streams. Capture, process, and store video streams & media streams for real-time video analytics ...
Read more >
Amazon Kinesis Video Streams is now available in nine more ...
Amazon Kinesis Video Streams is now available in nine additional AWS regions: US East (Ohio), Canada (Central), South America (São Paulo), ...
Read more >
Amazon Kinesis Video Streams endpoints and quotas
Service quotas ; Number of video streams. us-east-1: 10,000. us-west-2: 10,000. Each of the other supported Regions: 5,000. Yes ; PutMedia bandwidth, Each ......
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