!FindInMap [MapName, TopKey, SecondKey] reads a mapping (Mappings); its keys may come from Ref, which is how infra/booknest-data.yaml in Resources picks BillingMode by stage. Fn::If takes a condition name and two values, !If [IsProd, a, b]; the condition itself is built in the Conditions section from Fn::Equals, Fn::And, Fn::Or and Fn::Not. With !Ref AWS 24 ::NoValue as a branch, Fn::If removes the property, as that template does with ProvisionedThroughput outside prod. Fn::If also works in outputs and inside Fn::Sub variable maps, so one template describes every stage.
A FindInMap key missing from the mapping fails the deploy. With the AWS::LanguageExtensions transform (Fn::ForEach), AWS accepts a fourth argument, {DefaultValue: PAY_PER_REQUEST}, as a fallback; LocalStack 4.13.1 63,725 fails that form with an internal error (_resolve_mapping() takes 4 positional arguments but 5 were given), so keep AllowedValues and the mapping's keys in step.