aws-greengrass-provisioner icon indicating copy to clipboard operation
aws-greengrass-provisioner copied to clipboard

Can't update existing lambda function because of lambda update status 'in progess'

Open kimsehwan96 opened this issue 3 years ago • 2 comments
trafficstars

Hi, @timmattison

Updating existing lambda with greengrass provisioner isn't working because of 'lambda state especially LastUpdateStatus.

refer to https://aws.amazon.com/ko/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/

스크린샷 2021-11-25 오후 11 08 37

When greengrass provisioner update existing lambda by uploading zip file to S3, lambda that updated is in LastUpdateStatus 'in progress' like following image.

스크린샷 2021-11-25 오후 11 10 51

After few seconds, lambda that updated is in LastUpdateStatus Successful status and successfully updated. (creating function)

But 'greengrass provisioner' doesn't wait for this status changing (In progress -> Successful) so updating is failed. (updating lambda configuration, version, alias etc..)

We need to wait state changing delay for LastUpateStatus in https://github.com/awslabs/aws-greengrass-provisioner/blob/4c971f1df490c7f57f0699962368bb52e089d7db/src/main/java/com/awslabs/aws/greengrass/provisioner/implementations/helpers/BasicLambdaHelper.java#L230

kimsehwan96 avatar Nov 25 '21 14:11 kimsehwan96

I think this looks reasonable. Let me check in tomorrow and do some testing and then I'll merge it if it looks good.

timmattison avatar Apr 07 '22 23:04 timmattison

Thank you for filing this issue AND creating a PR! Sorry it was overlooked for a while.

timmattison avatar Apr 07 '22 23:04 timmattison