AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Demo to explore how the PowerShell custom runtime and a Lambda function work. ########################################################################## # Parameters & Globals # ########################################################################## Globals: Function: Tracing: Active Tags: Application: demo-runtime-layer-function Resources: ########################################################################## # Lambda functions # ########################################################################## PowerShellFunction: Type: AWS::Serverless::Function Properties: Description: PowerShell-Lambda-Runtime Demo Function CodeUri: function/ Runtime: provided.al2 Handler: examplehandler.ps1::handler MemorySize: 1024 Timeout: 100 Layers: - !Ref PwshRuntimeLayer Metadata: BuildMethod: makefile ########################################################################## # Lambda layers # ########################################################################## PwshRuntimeLayer: Type: AWS::Serverless::LayerVersion Properties: Description: Lambda Layer containing PowerShell ContentUri: powershell-runtime CompatibleRuntimes: - provided.al2 RetentionPolicy: Delete Metadata: BuildMethod: makefile ########################################################################## # OUTPUTS # ########################################################################## Outputs: PwshRuntimeLayer: Value: !Ref PwshRuntimeLayer Description: PwshRuntimeLayer Layer ARN PowerShellFunction: Value: !Ref PowerShellFunction Description: PowerShell Lambda Function