---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
  myFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: index.handler
      Runtime: nodejs22.x
      CodeUri: 's3://test-bucket/mySourceCode.zip'
      AutoPublishAlias: live
      DeploymentPreference:
        Type: Linear10PercentEvery10Minutes
      Events:
        ThumbnailApi:
          Type: Api
          Properties:
            Path: /thumbnail
            Method: GET
            RestApiId: !Ref myApi
  myApi:
    Type: AWS::Serverless::Api
    Properties:
      DefinitionUri: s3://bucket/swagger.json
      StageName: dev
