{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/1873","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/1873/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/1873/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/1873/events","html_url":"https://github.com/serverless/serverless/issues/1873","id":171429420,"number":1873,"title":"Support for filterRules in S3 events for v1 ?","user":{"login":"gergderkson","id":2325405,"avatar_url":"https://avatars.githubusercontent.com/u/2325405?v=3","gravatar_id":"","url":"https://api.github.com/users/gergderkson","html_url":"https://github.com/gergderkson","followers_url":"https://api.github.com/users/gergderkson/followers","following_url":"https://api.github.com/users/gergderkson/following{/other_user}","gists_url":"https://api.github.com/users/gergderkson/gists{/gist_id}","starred_url":"https://api.github.com/users/gergderkson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gergderkson/subscriptions","organizations_url":"https://api.github.com/users/gergderkson/orgs","repos_url":"https://api.github.com/users/gergderkson/repos","events_url":"https://api.github.com/users/gergderkson/events{/privacy}","received_events_url":"https://api.github.com/users/gergderkson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/serverless/serverless/labels/discussion","name":"discussion","color":"1d76db"},{"url":"https://api.github.com/repos/serverless/serverless/labels/help-wanted","name":"help-wanted","color":"0e8a16"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-08-16T14:35:05Z","updated_at":"2016-09-06T19:26:18Z","closed_at":null,"body":"Is it possible to include filterRules in S3 events so we can specify suffix/prefix like we could in v0?\r\n\r\nThe docs for this feature in v0:\r\n```\r\n\"name\" : \"myS3Event\",\r\n\"type\": \"s3\",\r\n\"config\": {\r\n  \"bucket\": \"${testEventBucket}\", // required! - bucket name\r\n  \"bucketEvents\": [\"s3:ObjectCreated:*\"], // required! - an array of events that should trigger the lambda\r\n  \"filterRules\" : [\r\n      {\r\n          \"name\" : \"prefix | suffix\",\r\n          \"value\" : \"STRING_VALUE\"\r\n      }\r\n   ] // optional, specify prefix or suffix for S3 event source\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/245061635","html_url":"https://github.com/serverless/serverless/issues/1873#issuecomment-245061635","issue_url":"https://api.github.com/repos/serverless/serverless/issues/1873","id":245061635,"user":{"login":"medhoover","id":11528275,"avatar_url":"https://avatars.githubusercontent.com/u/11528275?v=3","gravatar_id":"","url":"https://api.github.com/users/medhoover","html_url":"https://github.com/medhoover","followers_url":"https://api.github.com/users/medhoover/followers","following_url":"https://api.github.com/users/medhoover/following{/other_user}","gists_url":"https://api.github.com/users/medhoover/gists{/gist_id}","starred_url":"https://api.github.com/users/medhoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medhoover/subscriptions","organizations_url":"https://api.github.com/users/medhoover/orgs","repos_url":"https://api.github.com/users/medhoover/repos","events_url":"https://api.github.com/users/medhoover/events{/privacy}","received_events_url":"https://api.github.com/users/medhoover/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T19:26:18Z","updated_at":"2016-09-06T19:26:18Z","body":"Or we can have a more direct syntax:\r\n```yml\r\n#serverless.yml\r\n          rules:\r\n            -  prefix:  images/\r\n            -  suffix:  .jpg\r\n            -  suffix:  .png\r\n```\r\nBut this could require an additional key validation within the compileS3Events"}}
{"actor":{"display_login":"medhoover"}}