MyHelloWorldStack
Hello_World

CloudFormation Template

            {
 "AWSTemplateFormatVersion": "2010-09-09",
 "Description": "Simple Sparta application that demonstrates core functionality",
 "Resources": {
  "HelloWorldLambda7d01d27fe422d278bcc652b4a989528718eb88af": {
   "Type": "AWS::Lambda::Function",
   "DependsOn": [
    "IAMRole254383dffcf02e393981e3b2731226f97b1d212b"
   ],
   "Metadata": {
    "golangFunc": "Hello_World"
   },
   "Properties": {
    "Code": {
     "S3Bucket": "weagle",
     "S3Key": "MyHelloWorldStack/MyHelloWorldStack-code-710836d403083ac46999f02d2f1cfe69e270207c.zip"
    },
    "Description": "MyHelloWorldStack: Hello_World",
    "Environment": {
     "Variables": {
      "SPARTA_DISCOVERY_INFO": {
       "Fn::Base64": {
        "Fn::Join": [
         "",
         [
          "{\n",
          "\t\"ResourceID\": \"HelloWorldLambda7d01d27fe422d278bcc652b4a989528718eb88af\",\n",
          "\t\"Region\": \"",
          {
           "Ref": "AWS::Region"
          },
          "\",\n",
          "\t\"StackID\": \"",
          {
           "Ref": "AWS::StackId"
          },
          "\",\n",
          "\t\"StackName\": \"",
          {
           "Ref": "AWS::StackName"
          },
          "\",\n",
          "\t\"Resources\":{\n",
          "\t}\n",
          "}"
         ]
        ]
       }
      },
      "SPARTA_LOG_LEVEL": "info"
     }
    },
    "FunctionName": "MyHelloWorldStack_Hello_World",
    "Handler": "Sparta.lambda.amd64",
    "MemorySize": 128,
    "Role": {
     "Fn::GetAtt": [
      "IAMRole254383dffcf02e393981e3b2731226f97b1d212b",
      "Arn"
     ]
    },
    "Runtime": "go1.x",
    "Timeout": 3
   }
  },
  "IAMRole254383dffcf02e393981e3b2731226f97b1d212b": {
   "Type": "AWS::IAM::Role",
   "Properties": {
    "AssumeRolePolicyDocument": {
     "Statement": [
      {
       "Action": [
        "sts:AssumeRole"
       ],
       "Effect": "Allow",
       "Principal": {
        "Service": [
         "lambda.amazonaws.com"
        ]
       }
      },
      {
       "Action": [
        "sts:AssumeRole"
       ],
       "Effect": "Allow",
       "Principal": {
        "Service": [
         "ec2.amazonaws.com"
        ]
       }
      },
      {
       "Action": [
        "sts:AssumeRole"
       ],
       "Effect": "Allow",
       "Principal": {
        "Service": [
         "apigateway.amazonaws.com"
        ]
       }
      }
     ],
     "Version": "2012-10-17"
    },
    "Policies": [
     {
      "PolicyDocument": {
       "Statement": [
        {
         "Effect": "Allow",
         "Action": [
          "logs:CreateLogGroup",
          "logs:CreateLogStream",
          "logs:PutLogEvents"
         ],
         "Resource": {
          "Fn::Join": [
           "",
           [
            "arn:aws:logs:",
            {
             "Ref": "AWS::Region"
            },
            ":",
            {
             "Ref": "AWS::AccountId"
            },
            "*"
           ]
          ]
         }
        },
        {
         "Effect": "Allow",
         "Action": [
          "cloudwatch:PutMetricData"
         ],
         "Resource": "*"
        },
        {
         "Effect": "Allow",
         "Action": [
          "cloudformation:DescribeStacks",
          "cloudformation:DescribeStackResource"
         ],
         "Resource": {
          "Fn::Join": [
           "",
           [
            "arn:aws:cloudformation:",
            {
             "Ref": "AWS::Region"
            },
            ":",
            {
             "Ref": "AWS::AccountId"
            },
            ":stack/",
            {
             "Ref": "AWS::StackName"
            },
            "/*"
           ]
          ]
         }
        },
        {
         "Effect": "Allow",
         "Action": [
          "xray:PutTraceSegments",
          "xray:PutTelemetryRecords"
         ],
         "Resource": "*"
        }
       ],
       "Version": "2012-10-17"
      },
      "PolicyName": "LambdaPolicy"
     }
    ]
   }
  }
 }
}