Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 Bucket Notifications when processed in parallel not working #21860

Closed
jschoombee opened this issue Nov 22, 2021 · 3 comments
Closed

S3 Bucket Notifications when processed in parallel not working #21860

jschoombee opened this issue Nov 22, 2021 · 3 comments
Labels
service/s3 Issues and PRs that pertain to the s3 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@jschoombee
Copy link

jschoombee commented Nov 22, 2021

#12949 did not fix my issue.

Provider version "3.66.0"

Taking vars as map:

variable "accountmap" { 
    type = map(any)
    default = {
      "aws-npr-account1"  = "000000000001"
      "aws-npr-account2"  = "000000000002"
    }

Creating a aws_s3_bucket_notification from the map, in my case I have about ~20 account names to numbers:

resource "aws_s3_bucket_notification" "bucket_notification_from_map" {
  bucket   = var.cloudtrails3
  for_each = var.accountmap

  lambda_function {
    id                  = "bn-${each.key}"
    lambda_function_arn = "${module.terraform-aws-lambda-function.function.arn}:PRD"
    events              = ["s3:ObjectCreated:*"]
    filter_prefix       = "o-0ug2vj4fq2/AWSLogs/${each.value}/CloudTrail/"
    filter_suffix       = ".json.gz"

  }

Terraform runs the process in parallel, AWS has a little fit and the logic to retry, or perhaps retry less aggressively is not working:

Error: error putting S3 Bucket Notification Configuration: OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
│ 	status code: 409, request id: QFKBHG195TF924ZA, host id: BNlV6RNUfjds/8R6xPGUyGugLkR/SqgP4wv5gAPZlCNLXbKaxuSpKp+4tJbmRPWQrdFNQEyeygE=

Originally posted by @YakDriver in #7628 (comment)

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 22, 2021
@justinretzolk
Copy link
Member

Hey @jschoombee 👋 Thank you for taking the time to file this issue. So that we have all of the necessary information in order to look into this, can you update the issue description with the rest of the information found in the bug template?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. service/s3 Issues and PRs that pertain to the s3 service. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 22, 2021
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Nov 13, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2024
@justinretzolk justinretzolk removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/s3 Issues and PRs that pertain to the s3 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

2 participants