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.

KeyError: 'endpoint_resolver'

See original GitHub issue

Hi,

I sometimes get that error trying to call a lambda function boto3==1.3.1

def lambda_execute(payload):
    import boto3
    client = boto3.client('lambda', aws_access_key_id=KEY, aws_secret_access_key=SECRET region_name=REGION)
    client.invoke(**payload)

payload is in this format:

{'FunctionName': fct, 'InvocationType': 'Event', 'LogType': 'None', 'Payload': simplejson.dumps(payload, default=encode_model)}

error seems to be coming from get_component in botocore/session.py

screenshot 2016-09-07 11 35 14

Can you help ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:16
  • Comments:30 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
CosmicAnalogue465commented, Sep 8, 2016

Hi James, Yes it is - weird it hasn’t been raised before. would you recommend this as a solution? https://geekpete.com/blog/multithreading-boto3/

12reactions
ali1366commented, May 19, 2020

I changed s3 = boto3.resource(‘s3’) to below and it work for me

session = boto3.session.Session()
s3 = session.resource('s3')
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I sometimes get Key Error using SQS client
I am using boto3 SQS client to receive messages from AWS SQS FIFO queue. def consume_msgs(): sqs = None try: sqs = boto3.client(...
Read more >
botocore.session — Runway v2.6.3
... from botocore.regions import EndpointResolver from botocore.utils import ... _deferred[name] except KeyError: pass def lazy_register_component(self, ...
Read more >
Developers - KeyError: 'endpoint_resolver' - - Bountysource
Hi,. I sometimes get that error trying to call a lambda function boto3==1.3.1 def lambda_execute(payload): import boto3 client ...
Read more >
s3 - Go Packages
func WithEndpointResolver(v EndpointResolver) func(*Options) ... on the bucket, Amazon S3 will return an HTTP status code 404 ("no such key") error.
Read more >
pytest_localstack.contrib.botocore - pytest-localstack
__dict__["_internal_components"] except KeyError: raise ... EndpointResolver): """Resolve AWS service endpoints based on a LocalstackSession.
Read more >

github_iconTop Related Medium Post

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