[PYTHON] A story that I was addicted to calling Lambda from AWS Lambda.

How to call Lambda from Lambda (Python)

import boto3

def lambda_handler(event, context):
    clientLambda = boto3.client("lambda")
    clientLambda.invoke(
        FunctionName="recieveMail",
        InvocationType="Event",
        Payload=json.dumps(event)
    )

I call it from boto3's lambda client with the ʻinvoke () method. I was addicted to using ʻInvocation Type because I didn't understand it well.

This guy receives either ʻEvent | RequestResponse, ʻEvent is asynchronous, RequestResponse is synchronous Each works.

I was thinking of processing a large amount of mail at the SES Event, and when I ran into a problem that I couldn't handle at all by selecting RequestResponse appropriately, there was an explanation at the (?) Mark.

It was me that was bad. That's the story.

Recommended Posts

A story that I was addicted to calling Lambda from AWS Lambda.
A story that I was addicted to at np.where
A story I was addicted to when inserting from Python to a PostgreSQL table
A story that I was addicted to when I made SFTP communication with python
I was soberly addicted to calling awscli from a Python 2.7 script registered in crontab
A story that I fixed when I got Lambda logs from Cloudwatch Logs
A story I was addicted to trying to install LightFM on Amazon Linux
A story I was addicted to trying to get a video url with tweepy
I wrote AWS Lambda, and I was a little addicted to the default value of Python arguments
Summary of points I was addicted to running Selenium on AWS Lambda (python)
It was a life I wanted to OCR on AWS Lambda to locate the characters.
A quick explanation from creating AWS Lambda Layers to linking
Send a request from AWS Lambda to Amazon Elasticsearch Service
A story addicted to Azure Pipelines
I was addicted to multiprocessing + psycopg2
The story I was addicted to when I specified nil as a function argument in Go
A note I was addicted to when making a beep on Linux
Note that I was addicted to sklearn's missing value interpolation (Imputer)
A story that was struggling to loop processing 3 million ID data
A note I was addicted to when creating a table with SQLAlchemy
I was addicted to pip install mysqlclient
Note that I was addicted to accessing the DB with Python's mysql.connector using a web application.
I was addicted to Flask on dotCloud
What I was addicted to Python autorun
I was addicted to creating a Python venv environment with VS Code
Use Python from Java with Jython. I was also addicted to it.
[Python] I was addicted to not saving internal variables of lambda expressions
I was addicted to trying Cython with PyCharm, so make a note
I wrote a Slack bot that notifies delay information with AWS Lambda
A story that suffered from OS differences when trying to implement a dissertation
[Introduction to json] No, I was addicted to it. .. .. ♬
I was able to recurse in Python: lambda
What I was addicted to when creating a web application in a windows environment
The story of IPv6 address that I want to keep at a minimum
I made a library to operate AWS CloudFormation stack from CUI (Python Fabric)
Create a setting in terraform to send a message from AWS Lambda Python3.8 to Slack
A note I was addicted to when running Python with Visual Studio Code
I set up TensowFlow and was addicted to it, so make a note
A note that connects to Lambda via AWS API Gateway (HTTP API) to process POST data
A story that Seaborn was easy, convenient and impressed
A story that was convenient when I tried using the python ip address module
Note that I was addicted to npm script not passing in the verification environment
A story that failed when trying to remove the suffix from the string with rstrip
Terraform configured to launch AWS Lambda from Amazon SQS
The story of Linux that I want to teach myself half a year ago
I was addicted to scraping with Selenium (+ Python) in 2020
I tried to get an AMI using AWS Lambda
I want to AWS Lambda with Python on Mac!
Tweet from AWS Lambda
I was able to repeat it in Python: lambda
A story that was terrible if SELinux was properly disabled
I was addicted to trying logging.getLogger in Flask 1.1.x
What I was addicted to when using Python tornado
I want to bind a local variable with lambda
A story that I wondered if it stopped working at mglearn.plots.plot_nmf_faces and was an error?
When I tried to install PIL and matplotlib in a virtualenv environment, I was addicted to it.
I was so mushy that I wanted to have a national plane heal me. I have no regrets.
What I was addicted to when dealing with huge files in a Linux 32bit environment
I tried to make a generator that generates a C # container class from CSV with Python
Memo (March 2020) that I was addicted to when installing Arch Linux on MacBook Air 11'Early 2015
A story that made it possible to automatically create anison playlists from your music files