I am trying to decrypt a file present in s3 bucket. I am using an AWS lambda function to do so.
Here the code that I want to execute using AWS Lambda (I'm using code entry type as Edit code inline):
import aws_encryption_sdk
with aws_encryption_sdk.stream(
mode='d',
source=src_file,
key_provider=kms_key
) as decryptor:
for block in decryptor:
tgt_file.write(block)
However, my AWS lambda function is failing with the error:
Unable to import module 'lambda_function': No module named aws_encryption_sdk
Isn't it possible to use aws_encryption_sdk in AWS Lambda? If it's possible, please guide me on how to use it.
Thanks in advance!