I am trying to get a serverless app sync resolver deployed and I am following the documentation on Github under "Inline Datasources". The documentation suggests that the following should be enough to create a resolver with a lambda datasource inline:
The following snippet shows the example:
appSync:
resolvers:
Query.user:
dataSource:
type: 'AWS_LAMBDA'
config:
function:
timeout: 30
handler: 'functions/getUser.handler'
When I try to follow this example (shown below):
resolvers:
Query.get_data:
dataSource:
type: AWS_LAMBDA
config:
function:
timeout: 30
handler: "functions/get_data.handler"
I get the following error:
Warning: Invalid AppSync Configuration:
at appSync/resolvers/Query.get_data: must have required property 'functions'
at appSync/resolvers: contains invalid resolver definitions
I am not sure what this error really means, if someone has got a working example of this I would appreciate seeing where I have gone wrong as its a really simple example and is pretty much straight from the documentation.