serverless-nextjs / serverless-next.js

⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
MIT License
4.44k stars 452 forks source link

Customize lambda functions #175

Open kkwoker opened 4 years ago

kkwoker commented 4 years ago

I'm still on the old version of serverless-nextjs-plugin where defining a plugin in the serverless.yml file will create all the page lambda functions behind the scenes.

plugins:
  - serverless-nextjs-plugin

I'm trying to add cloudwatch alerts to only one of the lambda functions that this plugin creates, but since serverless-plugin-aws-alerts requires you to do this by specifying the alarm in the functions section, there's no way I can think of to customize a single lambda function from the serverless-nextjs-plugin

functions:
    <reference-to-function-from-serverless-nextjs-plugin>:
        alarms:
            - customizeFunction
plugins:
  - serverless-nextjs-plugin

Is there a way to target a function created by serverless-nextjs-plugin and customize it?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.