There appears to be a problem with the newly added http integration type.
Trying to define one, as a proxy to CloudSearch and it complains that I didn’t define a handler.
edit: removing a lot of my experimentation that’s unrelated to the stated question. will post a separate topic regarding querystring passthrough.
Here’s the relevant serverless.yml
search:
events:
- http:
path: /restapi/v1/search
method: get
cors: true
authorizer:
arn: "arn:aws:cognito-idp:${self:custom.currentRegion}:############:userpool/${self:custom.userPoolId}"
integration: http
request:
uri: "https://<cloudsearch-url-stuff>.<region>.cloudsearch.amazonaws.com/2013-01-01/search"
parameters:
'method.request.querystring.fq': false
'method.request.querystring.pretty': false
'method.request.querystring.q': true
'method.request.querystring.q.cursor': false
'method.request.querystring.q.options': false
'method.request.querystring.q.parser': false
'method.request.querystring.return': false
'method.request.querystring.size': false
'method.request.querystring.sort': false
'method.request.querystring.start': false
response:
statusCodes:
200:
pattern: ''
Issuing sls deploy -s brett results in the following error:
Serverless Error ---------------------------------------
Missing "handler" property in function ""search". Please
make sure you point to the correct lambda handler. For
example: handler.hello. Please check the docs for more
info
Stack Trace --------------------------------------------
I assume this is a bug as there shouldn’t be a Lambda function required in the resulting stack.
I’ve implemented it through the AWS Console and had it working. I’m just trying to include it in my serverless.yml so it stays in sync with the rest of my stack and can be deployed to other stages/environments without manual intervention.
Including a dummy handler removes the error, but creates a Lambda function that’s just taking up space not being used…
Is this a bug?