content/lab_assets/start/lab2/cfn-project/templates/lab2.template.yaml [1:68]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  S3BucketName:
    AllowedPattern: '^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$'
    ConstraintDescription: >-
      Quick Start bucket name can include numbers, lowercase letters, uppercase
      letters, and hyphens (-). It cannot start or end with a hyphen (-).
    Description: >-
      S3 bucket name for the Quick Start assets. Quick Start bucket name can
      include numbers, lowercase letters, uppercase letters, and hyphens (-). It
      cannot start or end with a hyphen (-).
    Type: String
  S3KeyPrefix:
    AllowedPattern: '^[0-9a-zA-Z-/]*$'
    ConstraintDescription: >-
      Can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/).
    Default: 'cfn-project/'
    Description: >-
      S3 key prefix where assets are located should end with a forward slash (/).
    Type: String
  LicenseToken:
    Default: 'Provide you license key'
    Description: This value is will be overriden using taskcat overrides
    Type: String
  AvailabilityZones:
    Description: List of Availability Zones This value will be injected during runtime by $[taskcat_genaz_3] psuedo-parameters 
    Type: List<AWS::EC2::AvailabilityZone::Name>
Resources:
  LambdaExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
        - Effect: Allow
          Principal:
            Service:
            - lambda.amazonaws.com
          Action:
          - sts:AssumeRole
      Path: "/"
      ManagedPolicyArns:
      - "arn:aws:iam::aws:policy/AWSLambdaExecute"
  GenRandomLambda:
    Type: AWS::Lambda::Function
    Properties:
      Description: Lambda creates simple random string
      Handler: lambda_function.handler
      Runtime: python3.7
      Role: !GetAtt 'LambdaExecutionRole.Arn'
      Timeout: 300
      Code:
        S3Bucket: !Ref 'S3BucketName'
        S3Key: !Sub '${S3KeyPrefix}lambda_functions/packages/GenRandom/lambda.zip'
  StringGenerator:
    DeletionPolicy: Retain
    Type: AWS::CloudFormation::CustomResource
    Properties:
      ServiceToken: !GetAtt GenRandomLambda.Arn
      Length: 12
Outputs:
  GeneratedRandomString:
    Description: Generated Random String
    Value: !GetAtt StringGenerator.RandomString
  LicenseToken:
    Description:  LicenseToken passed in via overrides
    Value: !Ref LicenseToken
  AvailabilityZones:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



content/lab_assets/start/lab3/cfn-project/templates/lab3.template.yaml [1:68]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  S3BucketName:
    AllowedPattern: '^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$'
    ConstraintDescription: >-
      Quick Start bucket name can include numbers, lowercase letters, uppercase
      letters, and hyphens (-). It cannot start or end with a hyphen (-).
    Description: >-
      S3 bucket name for the Quick Start assets. Quick Start bucket name can
      include numbers, lowercase letters, uppercase letters, and hyphens (-). It
      cannot start or end with a hyphen (-).
    Type: String
  S3KeyPrefix:
    AllowedPattern: '^[0-9a-zA-Z-/]*$'
    ConstraintDescription: >-
      Can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/).
    Default: 'cfn-project/'
    Description: >-
      S3 key prefix where assets are located should end with a forward slash (/).
    Type: String
  LicenseToken:
    Default: 'Provide you license key'
    Description: This value is will be overriden using taskcat overrides
    Type: String
  AvailabilityZones:
    Description: List of Availability Zones This value will be injected during runtime by $[taskcat_genaz_3] psuedo-parameters
    Type: List<AWS::EC2::AvailabilityZone::Name>
Resources:
  LambdaExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
        - Effect: Allow
          Principal:
            Service:
            - lambda.amazonaws.com
          Action:
          - sts:AssumeRole
      Path: "/"
      ManagedPolicyArns:
      - "arn:aws:iam::aws:policy/AWSLambdaExecute"
  GenRandomLambda:
    Type: AWS::Lambda::Function
    Properties:
      Description: Lambda creates simple random string
      Handler: lambda_function.handler
      Runtime: python3.7
      Role: !GetAtt 'LambdaExecutionRole.Arn'
      Timeout: 300
      Code:
        S3Bucket: !Ref 'S3BucketName'
        S3Key: !Sub '${S3KeyPrefix}lambda_functions/packages/GenRandom/lambda.zip'
  StringGenerator:
    DeletionPolicy: Retain
    Type: AWS::CloudFormation::CustomResource
    Properties:
      ServiceToken: !GetAtt GenRandomLambda.Arn
      Length: 12
Outputs:
  GeneratedRandomString:
    Description: Generated Random String
    Value: !GetAtt StringGenerator.RandomString
  LicenseToken:
    Description:  LicenseToken passed in via overrides
    Value: !Ref LicenseToken
  AvailabilityZones:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



