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

Unable to create multiple s3 trigger events for the same bucket. #422

Closed
xostap opened this issue Apr 12, 2018 · 1 comment · Fixed by #423
Closed

Unable to create multiple s3 trigger events for the same bucket. #422

xostap opened this issue Apr 12, 2018 · 1 comment · Fixed by #423
Labels

Comments

@xostap
Copy link

xostap commented Apr 12, 2018

Hi there,

I'm having an issue deploying multiple s3 trigger events for the same bucket.

Current Results:

When using evet_sources.json with eventSourceFile flag combination for deployment, only one of the s3 events listed in S3Events array (see below) will be created.

Expected Result:

The expectation is that user should be able to create multiple s3 triggers events for the same bucket if filter rules are different. It is currently possible to create manually multiple s3 trigger events using AWS Lambda console (UI) for the same bucket.

Here is deploy command example:

node-lambda deploy --configFile <SECRET_VARIABLES_FILE_US> --region us-east-1 --environment <ENV> --eventSourceFile <EVENT_SOURCES_FILE_US>

Here is "evet_sources.json" file contents:

{
  "S3Events": [
    {
      "Bucket": "dev-jobs",
      "Events": [
        "s3:ObjectCreated:*"
      ],
      "Filter": {
        "Key": {
          "FilterRules": [
            {
              "Name": "prefix",
              "Value": "router/input"
            },
            {
              "Name": "suffix",
              "Value": ".json"
            }
          ]
        }
      }
    },
    {
      "Bucket": "dev-jobs",
      "Events": [
        "s3:ObjectCreated:*"
      ],
      "Filter": {
        "Key": {
          "FilterRules": [
            {
              "Name": "prefix",
              "Value": "router/output"
            },
            {
              "Name": "suffix",
              "Value": ".json"
            }
          ]
        }
      }
    }
  ]
}
@abetomo
Copy link
Contributor

abetomo commented Apr 13, 2018

Thanks for the report.
It was a bug. I will fix it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants