Lambda : Layers - How to add pymysql module as your function layer?

preview_player
Показать описание
In this video, I have talked about Lambda Layers which are zip archive file comprising of a custom runtime or additional dependency modules or binaries required by your function code. Layers can be shared across multiple functions. If you want to know more, please refer to this public document -

$ mkdir python
$ cd python
$ pip3 install pymysql -t .
$ cd ..
$ chmod -R 755 python/

The above commands holds true for function with python runtime and for packages that is supported in Amazon Linux environments. Then follow the steps as specified in the public documentation of layers either using CLI command or Web console.

NOTE - Not endorsed by AWS, all opinions are mine.
Рекомендации по теме
Комментарии
Автор

Youre back! we waited 2 months for this update.

Acumen
Автор

Thanks bro, I was facing the same error
I tried to resolve it whole day. Eod found this and rectified.

srinivasareddy
Автор

Thanks bro!! It worked perfectly for me!!

gregoriopazh.
Автор

In my case, there is no bucket in my S3. what to be done ?

ashishchavan
Автор

I used pymssql but package is not imported. I follow your step.but won't work

guruprakashs