InvalidParameterType: Expected params.NotificationConfiguration.LambdaFunctionConfigurations[0].Filter.Key.FilterRules[0].Value to be a string
itinance opened this issue · 3 comments
itinance commented
After successfully deploying the lambda function i tried to add a first s3-handler:
npm run add-s3-handler --s3_bucket="xxxxxx" --s3_suffix=".jpg"
But it ends up reproducable with the following error:
> aws-lambda-image@0.13.0 add-s3-handler /data/workspace/aws-lambda-image
> claudia add-s3-event-source --profile $npm_package_config_profile --bucket $npm_config_s3_bucket --events s3:ObjectCreated:* --prefix $npm_config_s3_prefix --suffix $npm_config_s3_suffix
{ InvalidParameterType: Expected params.NotificationConfiguration.LambdaFunctionConfigurations[0].Filter.Key.FilterRules[0].Value to be a string
at ParamValidator.fail (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:50:37)
at ParamValidator.validateType (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:222:10)
at ParamValidator.validateString (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:154:32)
at ParamValidator.validateScalar (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:130:21)
at ParamValidator.validateMember (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:94:21)
at ParamValidator.validateStructure (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:75:14)
at ParamValidator.validateMember (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:88:21)
at ParamValidator.validateList (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:103:14)
at ParamValidator.validateMember (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:90:21)
at ParamValidator.validateStructure (/data/workspace/aws-lambda-image/node_modules/claudia/node_modules/aws-sdk/lib/param_validator.js:75:14)
message: 'Expected params.NotificationConfiguration.LambdaFunctionConfigurations[0].Filter.Key.FilterRules[0].Value to be a string',
code: 'InvalidParameterType',
time: 2017-12-17T22:20:39.920Z }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! aws-lambda-image@0.13.0 add-s3-handler: `claudia add-s3-event-source --profile $npm_package_config_profile --bucket $npm_config_s3_bucket --events s3:ObjectCreated:* --prefix $npm_config_s3_prefix --suffix $npm_config_s3_suffix`
npm ERR! Exit status 1
n
Any ideas?
mastershaig commented
same
crskay1 commented
Same problem, any ideas?
crskay1 commented
@mastershaig you can manually configure the event via the console:
S3 > your bucket > properties > events > add notification:
name: aws-lambda-image
events: objectcreate(all)
prefix: (if you have a sub folder where you drop your images rather than the root of the bucket)
suffix: file extension (example .jpg)
Send To: Lambda Fucntion
Lambda: aws-lambda-image
Then it'll work a treat.