0

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!

1 Answer 1

1

This is external python package. aws lambda provides Python environments for different python versions however if you want to use any of the external packages you should be uploading the package as part of your function package, for more details referpython packages for aws lambda

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.