serverless / serverless

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.
https://serverless.com
MIT License
46.41k stars 5.71k forks source link

Deployment error occurs from v4.4.4 without any changes #12850

Open nikon-h-mizukami opened 4 days ago

nikon-h-mizukami commented 4 days ago

Issue description

In a situation where serverless.yml and source code have not been changed, the following error occurs from v4.4.4 and deployment is not possible. Up to v4.4.3, I was able to deploy without any problems. I am using v6.0.0 of dotEnv, but there seems to be a problem with compatibility with v4.4.4. Please confirm.

[Container] 2024/10/04 07:50:47.055066 Running command sls deploy --region $AWS_REGION --stage $AWS_STAGE

✖ Error: Cannot resolve '${cf:application.DefaultSecurityGroup}' variable at 'functions.2.ApplicationRegister.vpc.securityGroupIds.1'. No value is available for this variable, and no default value was provided. Please check your variable definitions or provide a default value. at _ResolverManager.resolve (file:///root/.serverless/releases/4.4.4/package/dist/sf-core.js:655:55913) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async #handlePlaceholderNode (file:///root/.serverless/releases/4.4.4/package/dist/sf-core.js:655:54343) at async file:///root/.serverless/releases/4.4.4/package/dist/sf-core.js:655:52335 at async processNodeAndHandleCompletion (file:///root/.serverless/releases/4.4.4/package/dist/sf-core.js:655:43086)

For help, try the following: • Run the command again with the "--debug" option • Run "serverless support" • Review the docs: https://www.serverless.com/framework/docs/

Context

N/A

czubocha commented 3 days ago

Hi @nikon-h-mizukami, thanks for reporting this issue.

Please note that starting from v4, the Serverless Framework has built-in support for .env files, so using the dotEnv plugin is no longer required. You can safely remove it from your configuration if that’s relevant to your setup.

To help us investigate further, could you provide more details? Specifically, it would be helpful if you could share a reproducible example of your serverless.yml configuration.

In the meantime, you can pin the working version in your serverless.yml file to avoid disruption while we look into the issue. You can find more information about pinning a version here: Pinning a version.