Hi!
The current version for Boto3 is below 1.18.4, where a ResourceConflictException error related to AWS Lambda Deploy has been fixed (src). This error is related to the changes explained here by the AWS team.
Pipeline output:
<span>bed928cd028b: Pull complete</span>
<span>Digest: sha256:04ecf0a4530e7cdafe22a638ddcd8f63c4e308f77b1e4ea1e1dd4aa106656b00</span>
<span>Status: Downloaded newer image for bitbucketpipelines/aws-lambda-deploy:1.1.0</span>
<span>INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY</span>
<span>DEBUG: Starting new HTTPS connection (1): <a href="http://bitbucket.org:443" rel="noopener noreferrer" target="_blank">bitbucket.org:443</a></span>
<span>DEBUG: <a href="https://bitbucket.org:443" rel="noopener noreferrer" target="_blank">https://bitbucket.org:443</a> "GET /bitbucketpipelines/official-pipes/raw/master/pipes.prod.json HTTP/1.1" 200 None</span>
<span>INFO: Executing the aws-lambda-deploy pipe...</span>
<span>DEBUG: Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane</span>
<span>DEBUG: Changing event name from before-call.apigateway to before-call.api-gateway</span>
<span>DEBUG: Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict</span>
<span>DEBUG: Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration</span>
<span>DEBUG: Changing event name from before-parameter-build.route53 to before-parameter-build.route-53</span>
<span>DEBUG: Changing event name from <a href="http://request-created.cloudsearchdomain.Search" rel="noopener nofollow noreferrer" target="_blank">request-created.cloudsearchdomain.Search</a> to <a href="http://request-created.cloudsearch-domain.Search" rel="noopener nofollow noreferrer" target="_blank">request-created.cloudsearch-domain.Search</a></span>
<span>DEBUG: Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section</span>
<span>DEBUG: Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask</span>
<span>DEBUG: Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section</span>
<span>DEBUG: Changing event name from <a href="http://before-parameter-build.cloudsearchdomain.Search" rel="noopener nofollow noreferrer" target="_blank">before-parameter-build.cloudsearchdomain.Search</a> to <a href="http://before-parameter-build.cloudsearch-domain.Search" rel="noopener nofollow noreferrer" target="_blank">before-parameter-build.cloudsearch-domain.Search</a></span>
<span>DEBUG: Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section</span>
<span>DEBUG: IMDS ENDPOINT: <a href="http://169.254.169.254/" rel="noopener nofollow noreferrer" target="_blank">http://169.254.169.254/</a></span>
<span>DEBUG: Looking for credentials via: env</span>
<span>INFO: Found credentials in environment variables.</span>
<span>DEBUG: Loading JSON file: /usr/local/lib/python3.9/site-packages/botocore/data/endpoints.json</span>
<span>DEBUG: Event choose-service-name: calling handler <function handle_service_name_alias at 0x7fa511c20f70></span>
<span>DEBUG: Loading JSON file: /usr/local/lib/python3.9/site-packages/botocore/data/lambda/2015-03-31/service-2.json</span>
<span>DEBUG: Event creating-client-class.lambda: calling handler <function add_generate_presigned_url at 0x7fa511c4d790></span>
<span>DEBUG: Setting lambda timeout as (60, 60)</span>
<span>DEBUG: Loading JSON file: /usr/local/lib/python3.9/site-packages/botocore/data/_retry.json</span>
<span>DEBUG: Registering retry handlers for service: lambda</span>
<span>INFO: Updating Lambda function configuration.</span>
<span>DEBUG: Event before-parameter-build.lambda.UpdateFunctionConfiguration: calling handler <function generate_idempotent_uuid at 0x7fa511bca670></span>
<span>DEBUG: Event before-call.lambda.UpdateFunctionConfiguration: calling handler <function inject_api_version_header_if_needed at 0x7fa511bcbee0></span>
<span>DEBUG: Making request for OperationModel(name=UpdateFunctionConfiguration) with params: {'url_path': '/2015-03-31/functions/xxxx/configuration', 'query_string': {}, 'method': 'PUT', 'headers': {'User-Agent': 'Boto3/1.17.112 Python/3.9.6 Linux/5.4.92-flatcar Botocore/1.20.112'}, 'body': b'{"Role": "arn:aws:iam::205746061435:role/Nexplayer-License-Lambda", "Handler": "index.lambdaHandler", "Description": "DEV API v2 deployment", "Timeout": 30, "MemorySize": 256, "Environment": {"Variables": {"DEBUG": "true", "S3ApiVersion": "2006-03-01", "S3BucketName": "nexplayer-license-dev", "S3Region": "us-east-1"}}, "Layers": ["arn:aws:lambda:us-east-1:205746061435:layer:nexplayer-logger:6", "arn:aws:lambda:us-east-1:205746061435:layer:nexplayer-common:16", "arn:aws:lambda:us-east-1:205746061435:layer:psl:1", "arn:aws:lambda:us-east-1:205746061435:layer:axios:2"], "Runtime": "nodejs14.x"}', 'url': '', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x7fa5110f3100>, 'has_streaming_input': False, 'auth_type': None}}</span>
<span>DEBUG: Event request-created.lambda.UpdateFunctionConfiguration: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7fa5110f3070>></span>
<span>DEBUG: Event choose-signer.lambda.UpdateFunctionConfiguration: calling handler <function set_operation_specific_signer at 0x7fa511bca550></span>
<span>DEBUG: Calculating signature using v4 auth.</span>
<span>DEBUG: CanonicalRequest:</span>
<span>PUT</span>
<span>/2015-03-31/functions/xxxxx/configuration</span>
<span>host:lambda.us-east-1.amazonaws.com</span>
<span>x-amz-date:20211005T075411Z</span>
<span>host;x-amz-date</span>
<span>5a462927d44c5d995dd83c3c680c03fa0c800043545d962072da3c82fa65e0e4</span>
<span>DEBUG: StringToSign:</span>
<span>AWS4-HMAC-SHA256</span>
<span>20211005T075411Z</span>
<span>20211005/us-east-1/lambda/aws4_request</span>
<span>a188161dbb945e68d163fd50c27d0ef084134a3dcfea3d8cf3b05220d2d345c5</span>
<span>DEBUG: Signature:</span>
<span>df3e3ecc4ba0f1a04a8c0be2838aefa434fff06b16cd9fe60fd7add846528006</span>
<span>DEBUG: Sending http request: <AWSPreparedRequest stream_output=False, method=PUT, url=https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/xxxx/configuration, headers={'User-Agent': b'Boto3/1.17.112 Python/3.9.6 Linux/5.4.92-flatcar Botocore/1.20.112', 'X-Amz-Date': b'20211005T075411Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=$AWSID/20211005/us-east-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=df3e3ecc4ba0f1a04a8c0be2838aefa434fff06b16cd9fe60fd7add846528006', 'Content-Length': '598'}></span>
<span>DEBUG: Certificate path: /usr/local/lib/python3.9/site-packages/certifi/cacert.pem</span>
<span>DEBUG: Starting new HTTPS connection (1): <a href="http://lambda.us-east-1.amazonaws.com:443" rel="noopener nofollow noreferrer" target="_blank">lambda.us-east-1.amazonaws.com:443</a></span>
<span>DEBUG: <a href="https://lambda.us-east-1.amazonaws.com:443" rel="noopener nofollow noreferrer" target="_blank">https://lambda.us-east-1.amazonaws.com:443</a> "PUT /2015-03-31/functions/xxxxx/configuration HTTP/1.1" 200 1825</span>
<span>DEBUG: Response headers: {'Date': 'Tue, 05 Oct 2021 07:54:11 GMT', 'Content-Type': 'application/json', 'Content-Length': '1825', 'Connection': 'keep-alive', 'x-amzn-RequestId': 'f602613b-21ca-4e66-be6e-47b2f01fcbb1'}</span>
<span>DEBUG: Response body:</span>
<span>b'{"Description":"DEV API v2 deployment","TracingConfig":{"Mode":"PassThrough"},"VpcConfig":{"VpcId":"","SecurityGroupIds":[],"SubnetIds":[]},"SigningJobArn":null,"RevisionId":"3814806b-7ac5-4944-9c26-60cf087e72f8","LastModified":"2021-10-05T07:54:11.000+0000","FileSystemConfigs":null,"FunctionName":"xxx","Runtime":"nodejs14.x","Version":"$LATEST","PackageType":null,"LastUpdateStatus":"InProgress","Layers":","KMSKeyArn":null,"MemorySize":256,"ImageConfigResponse":null,"LastUpdateStatusReason":"The function is being created.","DeadLetterConfig":null,"Timeout":30,"Handler":"index.lambdaHandler","CodeSha256":"aoyZfk2bd+c28fwRU+sC5oUiZu5FHhyEeFwDmk6Z/tU=","Role":"arn:aws:iam::205746061435:role//***/","SigningProfileVersionArn":null,"MasterArn":null,"CodeSize":16107,"State":"Active","StateReason":null,"Environment":{"Variables":{"S3Region":"us-east-1","S3ApiVersion":"2006-03-01","S3BucketName":"***","DEBUG":"true"},"Error":null},"StateReasonCode":null,"LastUpdateStatusReasonCode":"Creating","Architectures":["x86_64"]}'</span>
<span>DEBUG: Event needs-retry.lambda.UpdateFunctionConfiguration: calling handler <botocore.retryhandler.RetryHandler object at 0x7fa5110f3a60></span>
<span>DEBUG: No retry needed.</span>
<span>✔ Lambda configuration update succeeded.</span>
<span>INFO: Updating Lambda function.</span>
<span>DEBUG: Event before-parameter-build.lambda.UpdateFunctionCode: calling handler <function generate_idempotent_uuid at 0x7fa511bca670></span>
<span>DEBUG: Event before-call.lambda.UpdateFunctionCode: calling handler <function inject_api_version_header_if_needed at 0x7fa511bcbee0></span>
<span>DEBUG: Making request for OperationModel(name=UpdateFunctionCode) with params: {'url_path': '/2015-03-31/functions/***/code', 'query_string': {}, 'method': 'PUT', 'headers': {'User-Agent': 'Boto3/1.17.112 Python/3.9.6 Linux/5.4.92-flatcar Botocore/1.20.112'}, 'body': b'{"Publish": true, "ZipFile": , 'url': '', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x7fa5110f3100>, 'has_streaming_input': False, 'auth_type': None}}</span>
<span>DEBUG: Event request-created.lambda.UpdateFunctionCode: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7fa5110f3070>></span>
<span>DEBUG: Event choose-signer.lambda.UpdateFunctionCode: calling handler <function set_operation_specific_signer at 0x7fa511bca550></span>
<span>DEBUG: Calculating signature using v4 auth.</span>
<span>DEBUG: CanonicalRequest:</span>
<span>PUT</span>
<span>/2015-03-31/functions/****/code</span>
<span>host:lambda.us-east-1.amazonaws.com</span>
<span>x-amz-date:20211005T075411Z</span>
<span>host;x-amz-date</span>
<span>43ec3d19fdba9634a61fb714d9d2b0c1a5b14a3f4f96fe1dffcf2e52b97b5706</span>
<span>DEBUG: StringToSign:</span>
<span>AWS4-HMAC-SHA256</span>
<span>20211005T075411Z</span>
<span>20211005/us-east-1/lambda/aws4_request</span>
<span>ac68570bf41afea71521dac5989439e6b38c726adb91f1ff2fb26a62b1115814</span>
<span>DEBUG: Signature:</span>
<span>49ebcda9365ecf57d7ae62b1b9bff742c6a81212eea2261f1397419830860b10</span>
<span>DEBUG: Sending http request: <AWSPreparedRequest stream_output=False, method=PUT, url=https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/****/code, headers={'User-Agent': b'Boto3/1.17.112 Python/3.9.6 Linux/5.4.92-flatcar Botocore/1.20.112', 'X-Amz-Date': b'20211005T075411Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=$AWSID/20211005/us-east-1/lambda/aws4_request, SignedHeaders=host;x-amz-date, Signature=49ebcda9365ecf57d7ae62b1b9bff742c6a81212eea2261f1397419830860b10', 'Content-Length': '23060'}></span>
<span>DEBUG: Certificate path: /usr/local/lib/python3.9/site-packages/certifi/cacert.pem</span>
<span>DEBUG: <a href="https://lambda.us-east-1.amazonaws.com:443" rel="noopener nofollow noreferrer" target="_blank">https://lambda.us-east-1.amazonaws.com:443</a> "PUT /2015-03-31/functions/xxxx/code HTTP/1.1" 409 180</span>
<span>DEBUG: Response headers: {'Date': 'Tue, 05 Oct 2021 07:54:11 GMT', 'Content-Type': 'application/json', 'Content-Length': '180', 'Connection': 'keep-alive', 'x-amzn-RequestId': '07322f5c-ebe9-43f8-9f4d-da4154f44c4f', 'x-amzn-ErrorType': 'ResourceConflictException'}</span>
<span>DEBUG: Response body:</span>
<span>b'{"Type":"User","message":"The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-1:****</span>
<span>DEBUG: Response headers: {'Date': 'Tue, 05 Oct 2021 07:54:11 GMT', 'Content-Type': 'application/json', 'Content-Length': '180', 'Connection': 'keep-alive', 'x-amzn-RequestId': '07322f5c-ebe9-43f8-9f4d-da4154f44c4f', 'x-amzn-ErrorType': 'ResourceConflictException'}</span>
<span>DEBUG: Response body:</span>
<span>b'{"Type":"User","message":"The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-1:****</span>
<span>DEBUG: Event needs-retry.lambda.UpdateFunctionCode: calling handler <botocore.retryhandler.RetryHandler object at 0x7fa5110f3a60></span>
<span>DEBUG: No retry needed.</span>
<span>✖ Failed to update Lambda function code. Error: An error occurred (ResourceConflictException) when calling the UpdateFunctionCode operation: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-1:xxxx</span><span>d0f52b114f67: Pull complete</span>