I am trying to connect to STFP using AWS Lambda which needs a private key file. I am able to connect from local and now I need to deploy it into a Lambda function. But pysftp.connection
needs filepath
rather than keystring
to connect.
Can I package the private file into my Lambda package using YAML file?
import pysftp
ftp = pysftp.Connection(host = hostname , username=user, port=22, private_key='...pem')
Can I store the pem file in AWS SSM and access file while connection to STFP?