Home > Software design >  getting error for client = boto3.client('eventbridge')
getting error for client = boto3.client('eventbridge')

Time:12-14

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

CodePudding user response:

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']
  • Related