The aws-lambda-deplopy pipe version 1.3.0 is not waiting on the LastUpdateStatus to be successful before proceeding.
In the case where we issue an update command with a function configuration, the code calls update_function_configuration first before calling update_function_code. To respect Lambda function states, the code uses a boto3 waiter. Here is where I believe the issue is, the call to get_waiter is using the parameter function_active. I believe the what it needs to do is call the get_waiter function with the parameter function_updated. This will make the pipe wait until the function configuration is correctly updated before calling update_function_code.
Attached are images showing the pipeline console and the error, a snippet of the code where I believe the change is needed
Igor thanks for the 1.4.0 release. It fixes the issue with the pipe. You might want to add an example that uses the WAIT attribute for an update followed by an alias operation. In our case we had to add the WAIT attribute so that it waits for the update to complete before it tries the alias.
@Billy Vazquez hi. We have the simple example that describes wait parameter:
Update the function 'my-lambda-function' in region 'us-east-1' with the function code contained in 'my-function-code.zip' and wait until lambda update is successful.
script: - pipe: atlassian/aws-lambda-deploy:1.4.0 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: 'my-lambda-function' COMMAND: 'update' ZIP_FILE: 'my-function-code.zip' WAIT: 'true'
but you are right, we should also provide such example in Combining Update with Alias paragraph.