appleboy / lambda-action

GitHub Action for Deploying Lambda code to an existing function
https://github.com/marketplace/actions/aws-lambda-deploy
MIT License
394 stars 58 forks source link

ResourceNotReady: exceeded wait attempts #68

Closed ruicovelo closed 1 year ago

ruicovelo commented 1 year ago

My actions were working fine but I haven't updated my code for a while. Not I am getting this error

2023/06/05 14:43:34 Update function configuration ... 2023/06/05 14:43:34 Current State: Active 2023/06/05 14:43:34 Last Update Status: Successful 2023/06/05 14:43:35 Update function code ... 2023/06/05 14:43:35 Current State: Active 2023/06/05 14:43:35 Last Update Status: InProgress 2023/06/05 14:43:35 Last Update Status Reason: The function is being created. 2023/06/05 14:43:35 Last Update Status ReasonCode: Creating 2023/06/05 14:43:35 Waiting Last Update Status to be successful ... 2023/06/05 14:54:37 ResourceNotReady: exceeded wait attempts 2023/06/05 14:54:37 ResourceNotReady: exceeded wait attempts

[debug]Docker Action run completed with exit code 1

that leads the action to fail. However, the lambda is updated correctly. It seems it waits for 11 minutes on an action that usually executes in seconds. It's like it's not receiving feedback from AWS?

yexia0 commented 1 year ago

Same problem.

nomeata commented 1 year ago

Aye, here as well. I have rather locked down permissions in the IAM – maybe the Last Update Status check needs permissions? But then it wouldn’t see Creating, I assume… Maybe AWS has introduced new statusses?

nomeata commented 1 year ago

Indeed, staring at

https://github.com/appleboy/drone-lambda/blob/7dd0761ff372fcd244ddfe59ae284ff92faff937/plugin.go#L334

led to me try it with the lambda:GetFunction permission added, and then it worked.

appleboy commented 1 year ago

See the AWS Policy https://github.com/appleboy/lambda-action#aws-policy