AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: WhatismyIP Lambda function template for Application Load Balancer Lambda as target

Outputs:
  WhatismyIPFunctionArn:
    Description: "WhatismyIPFunctionArn"
    Value: !GetAtt WhatismyIPFunction.Arn

Resources:
  WhatismyIPFunction:
    Type: AWS::Serverless::Function
    Properties:
      Description: An Application Load Balancer Lambda Target that returns the source IP address of the client
      Handler: whatismyip.lambda_handler
      Runtime: python3.8
      CodeUri: ./
      Timeout: 60