aws / aws/aws-toolkit-vscode

Amazon Q incorrectly validates AWS SAM template

Open
#5,250 0 comments 0 reactions 0 assignees View on GitHub
aws-documents aws-documents-sam-cfn bug
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

## Problem
Q does not recognise that the Globals section exists in the template and incorrectly marks the function definitions as invalid.

```
Globals:
Function:
Runtime: dotnet8
Timeout: 30
MemorySize: 512
Architectures:
- x86_64
Tracing: Active
....

```

![image](https://github.com/aws/aws-toolkit-vscode/assets/597073/fd0b7601-80df-4d42-a0c7-bdbd4d71325e)

## Steps to reproduce the issue
Nothing is required to reproduce the error, Q automatically marks these resources as invalid.

## Expected behavior
Do not mark the function as invalid.

## System details (run `AWS: About` and/or `Amazon Q: About`)

OS: Darwin arm64 23.5.0
Visual Studio Code extension host: 1.90.2
Amazon Q: 1.11.0
node: 20.9.0
electron: 29.4.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Amazon Q validation error with the AWS SAM template containing the shown Globals.Function section. Trace the Amazon Q AWS SAM template validation path and verify that function definitions using those globals are no longer marked invalid.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, vscode, yaml
Domain
cloud, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.