aws-toolkit-vscode: Lambda Sync no longer works in VS Code (had to revert to v3.27.0

Trying to do a Lambda Sync (i.e., Sync SAM Application (formerly Deploy)) failed with the following output:

2024-11-01 13:10:06.415 [info] Command: (not started) [C:\Program Files\Amazon\AWSSAMCLI\bin\sam.cmd sync --template .\template.yaml --s3-bucket [buckeName] --stack-name [this was empty, i.e., ""] --region us-east-1 --no-dependency-layer --no-watch] (running processes: 0)
2024-11-01 13:10:08.243 [error] aws.samcli.sync: Error: Failed to sync SAM application (deployType: infra; skipDependencyLayer: true; region: us-east-1; template: [object Object]; paramsSource: 2; stackName: [stackName]; bucketName: [bucketName]; syncFlags: []; projectRoot: file:///e%3A/OneDrive/[source root])
	 -> Error: sam sync exited with a non-zero exit code: 2 [NonZeroExitCode]
	 -> UnknownError: undefined

image

I did notice that the latest version asked for additional information related to parameters and gave me a warning on a missing samconfig.toml file

Reverting back to v3.2.7 allowed me to successfully sync.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

This is really weird, I’ll take another look and get back to you next Tuesday

Using v3.27.0, which works to allow syncing of my Lambda app, I use the following procedure:

  • Navigate to the AWS logo on the far right icon toolbar
  • Right-click on the Lambda option and select ‘Sync SAM Application (formerly Deploy)’
  • When asked about ‘Select a SAM template.yaml file’, I select my ‘template.yaml’ file
  • When asked about ‘Select a stack (or enter a name to create one)’, I select my previously created stack
  • When asked about ‘Select a bucket (or enter a name to create one)’, I select my previously created bucket
  • The application builds and syncs my Lambda application
  • I’m happy

Using v3.32.0, which works to allow syncing of my Lambda app, I use the following procedure:

  • Navigate to the AWS logo on the far right icon toolbar
  • Right-click on the Lambda option and select ‘Sync SAM Application (formerly Deploy)’
  • When asked about ‘Select a SAM template.yaml file’, I select my ‘template.yaml’ file
  • When asked about ‘Specify required parameters and save as defaults’, I don’t enter any and press enter
  • When asked about ‘Select a stack (or enter a name to create one)’, I select my previously created stack
  • When asked about ‘Select a bucket (or enter a name to create one)’, I select my previously created bucket
  • When asked about ‘Press enter to proceed with highlighted option’, by default ‘Watch’ and ‘Save parameters’ are selected - it doesn’t seem to matter what I select or don’t select, I press enter
  • The application fails to build
  • I’m sad