Skip to content

Commit

Permalink
docs(README): Update sample code for calling Local Lambda Invoke (aws…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcasalboni authored and jfuss committed Aug 1, 2018
1 parent b8ecb35 commit 4ae2f7c
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,18 +263,25 @@ configurations):
.. code:: python
import boto3
import botocore
# Set "running_locally" flag if you are running the integration test locally
running_locally = True
if running_locally:
# Create Lambda SDK client to connect to appropriate Lambda endpoint
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}))
region_name="us-west-2",
endpoint_url="http://127.0.0.1:3001",
use_ssl=False,
verify=False,
config=botocore.client.Config(
signature_version=botocore.UNSIGNED,
read_timeout=0,
retries={'max_attempts': 0},
)
)
else:
lambda_client = boto3.client('lambda')
Expand Down

0 comments on commit 4ae2f7c

Please sign in to comment.