Can we use plugins like Helmet.js and body-parser to secure a serverless function? If not, any alternatives?

Can we use plugins like Helmet.js and body-parser to secure a serverless function? If we can’t how can we implement those features to our serverless functions?

You can ‘npm install’ then in your serverless directory. Then when you deploy the node packages get installed into lambda along with your function.

That part is clear but the issue is, can we hook express middleware? I’m not sure about this. Helmet is a middleware.