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

InvalidParameterType: Expected params.NotificationConfiguration.LambdaFunctionConfigurations[0].Filter.Key.FilterRules[0].Value to be a string #154

Open
itinance opened this issue Dec 17, 2017 · 3 comments

Comments

@itinance
Copy link

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
Copy link

same

@crskay1
Copy link

crskay1 commented Feb 23, 2018

Same problem, any ideas?

@crskay1
Copy link

crskay1 commented Feb 23, 2018

@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.

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

No branches or pull requests

3 participants