I was trying to run API Gateway locally on my Mac with sam and template.yaml. However, I got this error ValueError: malformed url rule: '/v10/<device-name>'
Here is my my code in template.yaml:
GetListFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/lambda/
Handler: getList.lambda_handler
Runtime: python3.8
Events:
GetList:
Type: Api
Properties:
Path: /v10/{device-name}/
Method: get
Is there a way to use "-" in the variable name? If not, is there a workaround? Thanks!