From 55560a7ef134fc8708d3e63726277acf3daff04d Mon Sep 17 00:00:00 2001 From: Harold Wanyama Date: Tue, 29 Aug 2023 21:22:23 +0300 Subject: [PATCH] Added python requirements config for setting up cryptography Signed-off-by: Harold Wanyama --- cla-backend/requirements.txt | 1 + cla-backend/serverless.yml | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/cla-backend/requirements.txt b/cla-backend/requirements.txt index f14cee204..7440272f1 100644 --- a/cla-backend/requirements.txt +++ b/cla-backend/requirements.txt @@ -60,3 +60,4 @@ Werkzeug==0.15.5 wrapt==1.11.2 zipp==3.15.0 markupsafe==2.0.1 +cryptography==41.0.2 diff --git a/cla-backend/serverless.yml b/cla-backend/serverless.yml index f303291f1..bf8f4e977 100644 --- a/cla-backend/serverless.yml +++ b/cla-backend/serverless.yml @@ -26,14 +26,18 @@ package: - '!package-lock.json' - '!yarn.lock' - '.serverless-wsgi' - - '.packages/**' custom: allowed_origins: ${file(./env.json):cla-allowed-origins-${sls:stage}, ssm:/cla-allowed-origins-${sls:stage}} wsgi: app: cla.routes.__hug_wsgi__ pythonBin: python - pythonRequirements: false + pythonRequirements: + dockerizePip: true + dockerImage: public.ecr.aws/sam/build-python3.7:latest + dockerRunCmdExtraArgs: + - '--platform' + - 'linux/amd64' # Config for serverless-prune-plugin - remove all but the 10 most recent # versions to avoid the "Code storage limit exceeded" error prune: @@ -598,8 +602,6 @@ functions: method: ANY path: v2/{proxy+} cors: true - layers: - - Ref : CryptographyLayerLambdaLayer salesforceprojects: handler: cla.salesforce.get_projects @@ -637,11 +639,6 @@ functions: method: POST path: v2/github/activity -layers: - CryptographyLayerLambdaLayer: - package: - individually: true - artifact: cryptography-layer.zip resources: Conditions: