1

I came across this really good repo for my use case. https://github.com/Serber92/loadboard.

Here, he is using

carrierEmail = event.get('carrierEmail', '')

for the most part of his code. I am wondering how is he sending data to the lambda function.

I am aware of sending the information through 'api body' and 'api queryStringParameters' and to access this information we use something similar to this:

carrierEmail = event[queryStringParameters]['carrierEmail'].

The question here is how is he sending the data to lambda function?

5
  • Which file are you looking at specifically? Commented Nov 3, 2020 at 9:08
  • @Marcin creatBroker.py Commented Nov 3, 2020 at 9:47
  • In your question, you mentioned queryStringParameters? This is for api gateway. So you want to know how to call it from api gateway? Commented Nov 3, 2020 at 9:49
  • I want to know what event is he using to call the lambda function? Commented Nov 3, 2020 at 9:54
  • @Marcin could you help me out with this: stackoverflow.com/questions/64873480/… Commented Nov 17, 2020 at 10:37

1 Answer 1

1

The event for createBroker.py will be of the form of (partial example):

{
  "email": "some-email",
  "password": "some-password",
  "websiteURL": "some-websiteURL"
}

In terms of API gateway, such event structure is not possible with Lambda proxy integrations, which requires different format of the event object.

However, it would be possible with Lambda custom integrations. With the custom integration you can construct event object passed to the lambda function of any form, including the one used in createBroker.py.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.