Create pysftp_layer.zip file with paramiko and pysftp libraries and upload to an S3 bucket. Later on, this zip file will be added to your lambda layers configuration.
$mkdir -p build/python/lib/python3.9/site-packages
$pip3 install --target build/python/lib/python3.9/site-packages paramiko pysftp
$cd build
$zip -r pysftp_layer.zip .
$aws s3 cp pysftp_layer.zip s3://bucketName/packages/pysftp_layer.zip
https://www.linkedin.com/pulse/process-excel-files-aws-lambda-using-python-pandasand-tom-reid/