I’ve been using serverless v3 with serverless-offline for local development for a while now. I don’t deploy to the cloud using serverless. I purely use it with serverless-offline for local dev work, and it’s fantastic for that. I deploy instead with CDK. This has been working really well, but v4 is now making that more awkward due to the login requirement.
So a couple of questions if I may:
Is there any way to avoid needing a serverless login when only working locally?
If not, is there any way for me to determine if I have a valid session, so that I can automate the bash command to serverless login if my session has expired?
Hey there. You will only need to login once. You can also set a SERVERLESS_ACCESS_KEY which can be created in your Serverless Dashboard account under settings to ensure you never need to run serverless login
Thanks - this is what I’m doing. I just wondered if there was a way to even avoid having to register/login. Since it’s only for local development it doesn’t feel like it should be necessary. I also have infosec asking questions about whether this now means data is being shared as a part of any built-in telemetry.
No way to avoid it other than sticking with v3, that’s EOL in 2 months.
You’d have to check the details with Serverless’ privacy policy, but they’ve stated they only send stack ids to record them against the correct account.