简体   繁体   中英

getting error for client = boto3.client('eventbridge')

getting error for:

client = boto3.client('eventbridge')
botocore.exceptions.UnknownServiceError: Unknown service: 'eventbridge'. Valid services are xyz

I have upgraded my boto3 and botocore to the latest, but still this error didnt go away. boto3 version -> Version: 1.26.29 and botocore version -> Version: 1.29.29

client = boto3.client('events')

The boto3 EventBridge client is named events .

Pro Tip: List the available service clients with session.get_available_services()

session = boto3.Session(profile_name="my-profile", region_name="us-east-1")

services = [s for s in session.get_available_services() if s.startswith("event")]
print(services) # -> ['events']

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM