diff --git a/packages/core/package.json b/packages/core/package.json index 9c98855d..0c9a3b5e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@smythos/sre", - "version": "1.5.51", + "version": "1.5.52", "description": "Smyth Runtime Environment", "author": "Alaa-eddine KADDOURI", "license": "MIT", diff --git a/packages/core/src/helpers/AWSLambdaCode.helper.ts b/packages/core/src/helpers/AWSLambdaCode.helper.ts index 7d4f4166..a9ca2756 100644 --- a/packages/core/src/helpers/AWSLambdaCode.helper.ts +++ b/packages/core/src/helpers/AWSLambdaCode.helper.ts @@ -203,9 +203,12 @@ export async function createOrUpdateLambdaFunction(functionName, zipFilePath, aw }; const functionCreateCommand = new CreateFunctionCommand(functionParams); - const functionResponse = await client.send(functionCreateCommand); + await client.send(functionCreateCommand); // console.log('Function ARN:', functionResponse.FunctionArn); await verifyFunctionDeploymentStatus(functionName, client); + // wait 500 ms to let the function trust policy be applied + // it will only occur when the function is created for the first time + await new Promise((resolve) => setTimeout(resolve, 500)); } } catch (error) { throw error; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 138dc526..6604b8fe 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@smythos/sdk", - "version": "1.0.46", + "version": "1.0.47", "description": "SRE SDK", "keywords": [ "smythos",