Is it possible to invoke Serverless function with local
flag and skip some plugin(s)?
Use case:
we run end-2-end tests invoking function locally with some SNS message payload :
const event = createEvent({
template: 'aws:sns',
merge: {
Records: [{
Sns: {
Message: 'some-payload',
},
}],
},
});
exec('./node_modules/.bin/serverless invoke local -f functionName --data "' + JSON.stringify(event) +'"');
We use serverless-webpack plugin and it bundles for every invocation which takes ~10 seconds.
P.S. we use some fake-sns so we can’t invoke a function by pushing SNS message therefore we have to invoke lambda by exec