When running the aw-lambda-deploy pipe I am seeing the following error, the lambda is being updated.
<span>INFO: Writing results to file /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/aws-lambda-deploy-env.<br></span><span><a href="https://update-lambda.sh/" target="_blank" rel="noopener nofollow noreferrer">//update-lambda.sh</a>: line 22: /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/aws-lambda-deploy-env: Permission denied</span><span>INFO: Update command succeeded.<br></span>
I thought it may be memory related so increased the size of the step but continue to see the issue, this worked previously when I had less steps.
The failing pipeline.yml file is:
pipelines:
default:
- step:
name: Testing
caches: # Marks what will be in cache so it is not downloaded again.
- pip
script: # Modify the commands below to build your repository.
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- make coverage
- pwd
- ls -list
- step:
name: Sonar Scan
caches:
- sonar
script:
- pipe: sonarsource/sonarcloud-scan:1.0.1
variables:
EXTRA_ARGS: '-Dsonar.test.inclusions="**/*_test.py" -Dsonar.verbose=true'
- pipe: sonarsource/sonarcloud-quality-gate:0.1.3
- step:
name: Build Lambda
size: 2x
script:
# Build Lambda
- make archive
# Update lambda code and publish a new version
- pipe: atlassian/aws-lambda-deploy:0.5.3
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
FUNCTION_NAME: 'bucket-antivirus-function-dev'
COMMAND: 'update'
ZIP_FILE: 'build/lambda.zip'
If I run the Build Lambda step alone then it works.
I tried the workaround on this question but the file dos not exist so cannot be removed.
Any tips appreciated.