Parameters

The Parameters Section and Parameter Constraints

Parameters are inputs, passed with --parameter-overrides Key=Value. Each has a Type (String, Number, CommaDelimitedList, AWS 24 types such as AWS::EC2 24 ::VPC::Id, or AWS::SSM::Parameter::Value<String>, read from Parameter Store) and optional constraints: AllowedValues, AllowedPattern, MinLength/MaxLength, MinValue/MaxValue and a ConstraintDescription. NoEcho: true masks a value in output.

infra/booknest-data.yaml: header and the Parameters sectionYAML
AWSTemplateFormatVersion: "2010-09-09"
Description: BookNest's catalog table and front-end bucket, per stage
Parameters:
  Stage:
    Type: String
    AllowedValues: [dev, prod]
    Default: dev
    Description: Deployment stage
  TableSuffix:
    Type: String
    Default: books
    AllowedPattern: "^[a-z][a-z0-9-]{2,30}$"
    ConstraintDescription: lowercase letters, digits and hyphens, 3-31 characters
  ReadCapacity:
    Type: Number
    Default: 5
    MinValue: 1
    MaxValue: 50

AWS rejects a value that breaks a constraint before creating anything. LocalStack 4.13.1 63,725 checks none: Stage=test got as far as a mapping lookup, and TableSuffix=Books_1 created a table. cfn-lint 2,641 can check AllowedValues for the values you intend to pass:

Checking a parameter value before deployingYAML
cfn-lint booknest-data.yaml --parameters Stage=test
Output
E2900 'test' is not one of ['dev', 'prod']
booknest-data.yaml:4:3