boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
9.04k stars 1.87k forks source link

UnknownService: 'timestream-write' and 'timestream-query' when deploying with in AWS Chalice application #2832

Closed danieltensoriot closed 3 years ago

danieltensoriot commented 3 years ago

Describe the bug Deployment of an AWS Chalice application with usage of boto3 v1.15.2 does not deploy when using instance of service 'timestream-write'.

client = boto3.client('timestream-write')

Error message of "Unknown service: 'timestream-write'" applies from boto3 version 1.15.2, latest pip install version of boto3 to python project.

Service is available when instantiated within an AWS Lambda of Python3.8

Steps to reproduce

  1. Using AWS Chalice
  2. from terminal
  3. chalice new-project chalice-timestream-project
  4. cd chalice-timestream-project
  5. open project in text editor of choice
  6. open app.py file
  7. add client = boto3.client('timestream-write') to bottom of app.py file
  8. assuming project has a virtual environment into which the latest version of boto3 is install...
  9. from terminal, assuming AWS CLI credentials are set, run command chalice deploy

Expected behavior AWS Chalice project deploys without issue to create instance of service usage of 'timestream-write' within the Chalice application.

Debug logs Full stack trace by adding boto3.set_stream_logger('') to your code.

nateprewitt commented 3 years ago

Hi @danieltensoriot,

You'll need to update your copy of boto3 in order to use timestream with your chalice app. Boto3 1.15.2 was released before the existence of either of those services and won't be able to interact with them. The current release of boto3 is 1.17.54, and any version after 1.15.10 should have both timestream-write and timestream-query available.

danieltensoriot commented 3 years ago

Hi @danieltensoriot,

You'll need to update your copy of boto3 in order to use timestream with your chalice app. Boto3 1.15.2 was released before the existence of either of those services and won't be able to interact with them. The current release of boto3 is 1.17.54, and any version after 1.15.10 should have both timestream-write and timestream-query available.

Thank you, my current installer was defaulting to 1.15.2 for some reason or another. Thank you for your assistance.

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or 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.