Skip to content

Local Lambda endpoint sample code is broken #583

@alexcasalboni

Description

@alexcasalboni

Description:

If you just copy-and-past this code and run it locally, it fails:

import boto3

if running_locally:

    lambda_client = boto3.client('lambda',
                                 endpoint_url="http://127.0.0.1:3001",
                                 use_ssl=False,
                                 verify=False,
                                 config=Config(signature_version=UNSIGNED,
                                               read_timeout=0,
                                               retries={'max_attempts': 0}))

Observed result: NameError and botocore.exceptions.NoRegionError are raised

Expected result: the code should run smoothly without any required change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions