aws-solutions / aws-waf-security-automations

This solution automatically deploys a single web access control list (web ACL) with a set of AWS WAF rules designed to filter common web-based attacks.
https://aws.amazon.com/solutions/aws-waf-security-automations
Apache License 2.0
845 stars 361 forks source link

WAFStaleDataException error with 2.3.0 #85

Closed darrenweiner1 closed 1 year ago

darrenweiner1 commented 5 years ago

Hi there, Is there a known issue with 2.3.0 and intermittent failures related to this? It looks like maybe multiple rules are trying to be created at once and this error is being thrown (along with Throttling Exception errors). If so, any workaround available on this (e.g. is there a specific rule that should be disabled?). Thanks.

sushilfirminiq commented 5 years ago

Facing the same issue while creating the WAF from cloudformation. Error: "Failed to create resource. An error occurred (WAFStaleDataException) when calling the UpdateWebACL operation: The input token is no longer current"

hvital commented 5 years ago

In version 2.3.0 we're leveraging SDK exponential backoff handler.

However, depending on how frequent AWS WAF API is called, it might throw this WAFStaleDataException ... This sometimes happen during provisioning/deleting the stack.

We're working on to also retry call in case of this client error code (WAFStaleDataException). For python lambdas, we can use https://pypi.org/project/backoff/ for that.

jeffneuen commented 5 years ago

Are there any suggested workarounds before the next release? This bug is preventing deployment of 2.3.0 via cloudformation in some cases.

tomotway commented 5 years ago

Hi, so I'm hitting this issue every time. Please correct me if I'm wrong but this version appears to be unusable? Are there any workarounds? thanks

chris-denglere commented 5 years ago

I contacted AWS support about this issue and was told the current workaround is to wait an hour and then try deploying the stack again. It's not the most convenient workaround, but in my experience it does work 100% of the time that I tried it.

tomotway commented 5 years ago

I actually tried it about 4 times yesterday and once today and then gave up. However, based on your comment @chris-denglere I just gave it one more go and it worked, thanks!

aijunpeng commented 1 year ago

We have deprecated version 2.3.0. closing the ticket