---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Parameters:
  Stage1:
    Description: Environment stage (deployment phase)
    Type: String
    AllowedValues:
      - beta
      - prod
  Stage2:
    Description: Environment stage (deployment phase)
    Type: String
    AllowedValues:
      - beta
      - prod

Resources:
  SkillFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: '.'
      Handler: main.handler
      Runtime: python3.12
      Timeout: 30
      MemorySize: 128
      AutoPublishAlias: !Ref Stage1
  SkillFunction2:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: '.'
      Handler: main.handler
      Runtime: python3.12
      Timeout: 30
      MemorySize: 128
      FunctionName: !Sub "Stage-${Stage2}-${AWS::Region}"
      AutoPublishAlias: !Ref Stage2
