JustinPihony / gradle-aws-plugin-reboot

Gradle plugin to manage Amazon Web Services
6 stars 5 forks source link

ResourceConflictException #17

Open constructivetim opened 2 years ago

constructivetim commented 2 years ago

I believe that this change is causing issues for this library:

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

in the past few days, i have started getting:

The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-2:700816333857:function:scheduleBroadcasts (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: 58c23e92-d13b-4d60-8a65-728ab960446d; Proxy: null)

If I place "aws:states:opt-out" in my lambda description field, I can deploy again, but it looks like this opt-out will only last until dec 6th.

Is anyone else having similar issues?

thanks

tim

avisecag commented 2 years ago

I can confirm this issue, and offer a ... workaround, if you'd call it that.

Essentially, if your filesize is large enough, the upload seems to take long enough for the state to switch to ready again before the plugin continues. I'm not entirely sure why, but I did notice that we only had one lambda with deployment issues, it had it only when deploying through jenkins (which runs inside the aws vpc) and not when deploying from a local machine, and the only difference to other lambdas that are still working was that it was the smallest of them all.

So I bloated the file by building in some unnecessary dependencies, and now it works again. The necessary filesize when the deployment happens from inside the vpc seems to be somewhere between 10 and 14 MB, I haven't narrowed it quite all the way down. Here's my relevant stackoverflow post: https://stackoverflow.com/questions/70286698/aws-lambda-resourceconflictexception-on-deployment/70288471#70288471

Obviously, this workaround sucks, so it would be very nice if the plugin could be updated to accommodate this new feature.

constructivetim commented 2 years ago

thanks for the confirmation.

my filesize is 43.1 MB, but i have fast upload speeds.

I ended up moving this buidstep out of gradle and into my cicd provider https://buddy.works/

tim