Using the serverless framework I have defined a lambda that can be either triggered every hour or via SNS
...
functions: {
fooAction: {
handler: 'handler.fooAction',
events: [
{
schedule: 'rate(1 hour)',
},
{
sns: {
topicName: 'fooTopic',
},
},
],
},
...
}
...
What is the correct typescript syntax when defining fooAction
function?
I have tried
import { SNSHandler, ScheduledHandler} from 'aws-lambda';
...
export const fooAction: ScheduledHandler | SNSHandler = async (evt) => { ... };
but evt
resolves to any
.