AWSTemplateFormatVersion: '2010-09-09'
Description: Required Properties.
Resources:
  Function1: # S3 key to deployment package
    Type: AWS::Lambda::Function
    Properties:
      Handler: index.handler
      Role: arn:aws:iam::123456789012:role/lambda-role
      Code:
        S3Bucket: my-bucket
        S3Key: function.zip
      Runtime: python3.9
  Function2: # source inline (zipped by CloudFormation)
    Type: AWS::Lambda::Function
    Properties:
      Handler: index.handler
      Role: arn:aws:iam::123456789012:role/lambda-role
      Code:
        ZipFile: |
          import { LambdaClient } from '@aws-sdk/client-lambda';
          exports.handler = function(event, context) {}
      Runtime: nodejs22.x
  Function3: # image deployment
    Type: AWS::Lambda::Function
    Properties:
      Role: arn:aws:iam::123456789012:role/lambda-role
      Code:
        ImageUri : 111122223333.dkr.ecr.us-east-1.amazonaws.com/hello-world:latest
      PackageType: Image
