Skip to content

Commit fc9c220

Browse files
committedNov 30, 2021
fix for lambda states
1 parent 5cb9b61 commit fc9c220

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed
 

‎serverless.component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: aws-lambda
2-
version: 3.0.0
2+
version: 3.0.1
33
author: eahefnawy
44
org: serverlessinc
55
description: Deploys an AWS Lambda Function

‎src/utils.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,16 @@ const updateLambdaFunctionConfig = async (instance, lambda, inputs) => {
270270
})
271271
}
272272

273-
const res = await lambda.updateFunctionConfiguration(functionConfigParams).promise()
273+
let res
274+
try {
275+
res = await lambda.updateFunctionConfiguration(functionConfigParams).promise()
276+
} catch (e) {
277+
if (e.code === 'ResourceConflictException') {
278+
await sleep(2000)
279+
return await updateLambdaFunctionConfig(instance, lambda, inputs)
280+
}
281+
throw e
282+
}
274283

275284
// update retry config
276285
await lambda

0 commit comments

Comments
 (0)