I am able to update a single Lambda function using the BB pipelines approach. However, when I try to update multiple Lambda functions with the same script, it terminates the deployment giving an error that it is not able to find the second zipped folder! Below is my script.
pipelines:
default:
- step:
caches:
- pip
script: # Modify the commands below to build your repository.
- apt-get update
- apt-get install -y zip
- cd .aws-sam/build/LambdaFunction && zip -r9 lambda2.zip * -x "bin/*" requirements.txt
- cd .aws-sam/build/KinesisLambdaProcess && zip -r9 lambda1.zip * -x "bin/*" requirements.txt
- pipe: atlassian/aws-lambda-deploy:0.3.0
variables:
AWS_ACCESS_KEY_ID: 'MY AWS_ACCESS_KEY_ID'
AWS_SECRET_ACCESS_KEY: 'MY AWS_SECRET_ACCESS_KEY'
AWS_DEFAULT_REGION: 'us-east-1'
FUNCTION_NAME: 'streametricduplicate-subtract-lambda'
COMMAND: 'update' # 'alias' or 'update'
# Update variables
ZIP_FILE: 'lambda2.zip'
FUNCTION_NAME: 'streametricduplicate-batchdbwite-lambda'
COMMAND: 'update' # 'alias' or 'update'
# Update variables
ZIP_FILE: 'lambda1.zip'
The error I am getting is: "Error parsing parameter '--zip-file': Unable to load paramfile fileb://lambda1.zip: [Errno 2] No such file or directory: 'lambda1.zip'"
Should I create a new Step for the second Lambda or is it possible to get this done within a single step, using multiple Pipes? Kindly advise. Thanks!
Cheers,
Sreekanth.