Using the encryption sdk within lambda

0

Hi,
I am trying to use the aws encryption sdk within a lambda, however i am getting multiple errors when attempting to do so.
Is there a guide which shows you how to import the requisite libraries into a lambda function ?

  • I know this is an old thread but for anyone who is wanting to do this using node.js do the following: create a dicrectory called nodejs. CD into the nodejs directory. Then npm init -y Then npm install '@aws-crypto/client-node Then cd out of the nodejs directory and zip the nodejs directory and call the file nodejs.zip.

    Next go to AWS Lambda and select layers, add new layer. Name it aws-crypto and upload your nodejs.zip file.

    In your lambda function add the aws-crypto layer you just created to your function.

    in your index.js include: require('@aws-crypto/client-node');

AshishP
質問済み 4年前2716ビュー
2回答
0
承認された回答

Hi,

Instructions for how to include libraries with your lambda function are available in the aws documentation:

Java: https://docs.aws.amazon.com/lambda/latest/dg/java-package.html
Python: https://docs.aws.amazon.com/lambda/latest/dg/python-package.html
Nodejs: https://docs.aws.amazon.com/lambda/latest/dg/nodejs-package.html

You should be able to include the AWS Encryption SDK in your lambda by following the instructions for your language.

AWS
回答済み 4年前
0

I was having issues while preparing a deployment package for lambda. When I was zipping the requisite libraries some files which were hidden within the sub directories were being skipped and this was causing issues because the deployment package was essentially incomplete.

AshishP
回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ