{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "The AWS CloudFormation template for this Serverless application",
  "Resources": {
    "ServerlessDeploymentBucket": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketEncryption": {
          "ServerSideEncryptionConfiguration": [
            {
              "ServerSideEncryptionByDefault": {
                "SSEAlgorithm": "AES256"
              }
            }
          ]
        }
      }
    },
    "ServerlessDeploymentBucketPolicy": {
      "Type": "AWS::S3::BucketPolicy",
      "Properties": {
        "Bucket": {
          "Ref": "ServerlessDeploymentBucket"
        },
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "s3:*",
              "Effect": "Deny",
              "Principal": "*",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "ServerlessDeploymentBucket"
                      },
                      "/*"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "ServerlessDeploymentBucket"
                      }
                    ]
                  ]
                }
              ],
              "Condition": {
                "Bool": {
                  "aws:SecureTransport": false
                }
              }
            }
          ]
        }
      }
    },
    "HelloLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-hello"
      }
    },
    "PingLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-ping"
      }
    },
    "ThrottlerLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-throttler"
      }
    },
    "DriveStreamLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-driveStream"
      }
    },
    "DriveQueueLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-driveQueue"
      }
    },
    "DriveTableLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-driveTable"
      }
    },
    "StreamProcessorLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-streamProcessor"
      }
    },
    "HttpGetterLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "/aws/lambda/serverless-test-project-dev-httpGetter"
      }
    },
    "IamRoleLambdaExecution": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Version": "2012-10-17",
          "Statement": [
            {
              "Effect": "Allow",
              "Principal": {
                "Service": [
                  "lambda.amazonaws.com"
                ]
              },
              "Action": [
                "sts:AssumeRole"
              ]
            }
          ]
        },
        "Policies": [
          {
            "PolicyName": {
              "Fn::Join": [
                "-",
                [
                  "serverless-test-project",
                  "dev",
                  "lambda"
                ]
              ]
            },
            "PolicyDocument": {
              "Version": "2012-10-17",
              "Statement": [
                {
                  "Effect": "Allow",
                  "Action": [
                    "logs:CreateLogStream",
                    "logs:CreateLogGroup"
                  ],
                  "Resource": [
                    {
                      "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/serverless-test-project-dev*:*"
                    }
                  ]
                },
                {
                  "Effect": "Allow",
                  "Action": [
                    "logs:PutLogEvents"
                  ],
                  "Resource": [
                    {
                      "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/serverless-test-project-dev*:*:*"
                    }
                  ]
                },
                {
                  "Effect": "Allow",
                  "Action": [
                    "kinesis:GetRecords",
                    "kinesis:GetShardIterator",
                    "kinesis:DescribeStream",
                    "kinesis:ListStreams"
                  ],
                  "Resource": [
                    {
                      "Fn::GetAtt": [
                        "stream",
                        "Arn"
                      ]
                    }
                  ]
                }
              ]
            }
          }
        ],
        "Path": "/",
        "RoleName": {
          "Fn::Join": [
            "-",
            [
              "serverless-test-project",
              "dev",
              {
                "Ref": "AWS::Region"
              },
              "lambdaRole"
            ]
          ]
        }
      }
    },
    "HelloLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "basic-handler.hello",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-hello",
        "MemorySize": 1024,
        "Timeout": 6,
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "HelloLogGroup"
      ]
    },
    "PingLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "basic-handler.hello",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-ping",
        "MemorySize": 1024,
        "Timeout": 6,
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "PingLogGroup"
      ]
    },
    "ThrottlerLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "basic-handler.hello",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-throttler",
        "MemorySize": 1024,
        "Timeout": 6,
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        },
        "ReservedConcurrentExecutions": 0
      },
      "DependsOn": [
        "ThrottlerLogGroup"
      ]
    },
    "DriveStreamLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "stream-test-handler.handleDrive",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-driveStream",
        "MemorySize": 1024,
        "Timeout": 6,
        "Environment": {
          "Variables": {
            "STREAM_NAME": {
              "Ref": "stream"
            }
          }
        },
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "DriveStreamLogGroup"
      ]
    },
    "DriveQueueLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "queue-test-handler.handleDrive",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-driveQueue",
        "MemorySize": 1024,
        "Timeout": 6,
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "DriveQueueLogGroup"
      ]
    },
    "DriveTableLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "table-test-hander.handleDrive",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-driveTable",
        "MemorySize": 1024,
        "Timeout": 6,
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "DriveTableLogGroup"
      ]
    },
    "StreamProcessorLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "stream-handler.handle",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-streamProcessor",
        "MemorySize": 1024,
        "Timeout": 6,
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "StreamProcessorLogGroup"
      ]
    },
    "HttpGetterLambdaFunction": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Ref": "ServerlessDeploymentBucket"
          },
          "S3Key": "serverless/serverless-test-project/dev/1653074572190-2022-05-20T19:22:52.190Z/serverless-test-project.zip"
        },
        "Handler": "apigw-handler.handleGet",
        "Runtime": "nodejs24.x",
        "FunctionName": "serverless-test-project-dev-httpGetter",
        "MemorySize": 1024,
        "Timeout": 30,
        "Role": {
          "Fn::GetAtt": [
            "IamRoleLambdaExecution",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "HttpGetterLogGroup"
      ]
    },
    "HelloLambdaVersion722UxcHK84FtzQksFJLgO33214XN092rFeZxfBAWMI": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "HelloLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "PingLambdaVersionkRCLggFwidyGPubIpsDG3Bz131vjOVNlzKj7NBM8UgE": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "PingLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "ThrottlerLambdaVersionl91cFljDzhpqWXdQeA2t4nCL4O8S6eewBytew6LYg": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "ThrottlerLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "DriveStreamLambdaVersionZym9I4CW26PuJ2g26SXA4zCtxJm3jUEOzGB9JSpCIA": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "DriveStreamLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "DriveQueueLambdaVersionqxLBmX6bkW9KfIv3nK7Euv6IWU2k1LNIfruRKLQ": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "DriveQueueLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "DriveTableLambdaVersionmshp4vuCFXIuqNxokV8OQhvrXhDNTcfJirpkqQC5PM": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "DriveTableLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "StreamProcessorLambdaVersionwlUSF2MKmypdz7S8ASUEQJniFQJWYRU4J5ElG6ncY": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "StreamProcessorLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "HttpGetterLambdaVersion8bkTDhhXsi9cMBh96OfTi3WanBalxcwLoE8XqtXkHcc": {
      "Type": "AWS::Lambda::Version",
      "DeletionPolicy": "Retain",
      "Properties": {
        "FunctionName": {
          "Ref": "HttpGetterLambdaFunction"
        },
        "CodeSha256": "FiQzGCDK0fxVWHwCwOVhJmiILUfHAGFpReDupCZm4IY="
      }
    },
    "WorkflowRole": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Version": "2012-10-17",
          "Statement": [
            {
              "Effect": "Allow",
              "Principal": {
                "Service": {
                  "Fn::Sub": "states.${AWS::Region}.amazonaws.com"
                }
              },
              "Action": "sts:AssumeRole"
            }
          ]
        },
        "Policies": [
          {
            "PolicyName": "dev-serverless-test-project-statemachine",
            "PolicyDocument": {
              "Version": "2012-10-17",
              "Statement": [
                {
                  "Effect": "Allow",
                  "Action": [
                    "lambda:InvokeFunction"
                  ],
                  "Resource": [
                    {
                      "Fn::GetAtt": [
                        "PingLambdaFunction",
                        "Arn"
                      ]
                    },
                    {
                      "Fn::Sub": [
                        "${functionArn}:*",
                        {
                          "functionArn": {
                            "Fn::GetAtt": [
                              "PingLambdaFunction",
                              "Arn"
                            ]
                          }
                        }
                      ]
                    }
                  ]
                },
                {
                  "Effect": "Allow",
                  "Action": [
                    "logs:CreateLogDelivery",
                    "logs:GetLogDelivery",
                    "logs:UpdateLogDelivery",
                    "logs:DeleteLogDelivery",
                    "logs:ListLogDeliveries",
                    "logs:PutResourcePolicy",
                    "logs:DescribeResourcePolicies",
                    "logs:DescribeLogGroups"
                  ],
                  "Resource": "*"
                }
              ]
            }
          }
        ]
      }
    },
    "ExpressWorkflowRole": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Version": "2012-10-17",
          "Statement": [
            {
              "Effect": "Allow",
              "Principal": {
                "Service": {
                  "Fn::Sub": "states.${AWS::Region}.amazonaws.com"
                }
              },
              "Action": "sts:AssumeRole"
            }
          ]
        },
        "Policies": [
          {
            "PolicyName": "dev-serverless-test-project-statemachine",
            "PolicyDocument": {
              "Version": "2012-10-17",
              "Statement": [
                {
                  "Effect": "Allow",
                  "Action": [
                    "lambda:InvokeFunction"
                  ],
                  "Resource": [
                    {
                      "Fn::GetAtt": [
                        "PingLambdaFunction",
                        "Arn"
                      ]
                    },
                    {
                      "Fn::Sub": [
                        "${functionArn}:*",
                        {
                          "functionArn": {
                            "Fn::GetAtt": [
                              "PingLambdaFunction",
                              "Arn"
                            ]
                          }
                        }
                      ]
                    }
                  ]
                },
                {
                  "Effect": "Allow",
                  "Action": [
                    "logs:CreateLogDelivery",
                    "logs:GetLogDelivery",
                    "logs:UpdateLogDelivery",
                    "logs:DeleteLogDelivery",
                    "logs:ListLogDeliveries",
                    "logs:PutResourcePolicy",
                    "logs:DescribeResourcePolicies",
                    "logs:DescribeLogGroups"
                  ],
                  "Resource": "*"
                }
              ]
            }
          }
        ]
      }
    },
    "Workflow": {
      "Type": "AWS::StepFunctions::StateMachine",
      "Properties": {
        "DefinitionString": {
          "Fn::Sub": [
            "{\n  \"StartAt\": \"What Next?\",\n  \"States\": {\n    \"What Next?\": {\n      \"Type\": \"Choice\",\n      \"Choices\": [\n        {\n          \"Variable\": \"$.destination\",\n          \"StringEquals\": \"fail\",\n          \"Next\": \"Fail\"\n        },\n        {\n          \"Variable\": \"$.destination\",\n          \"StringEquals\": \"timeoutTask\",\n          \"Next\": \"TimeoutTask\"\n        },\n        {\n          \"Variable\": \"$.destination\",\n          \"StringEquals\": \"keepWaiting\",\n          \"Next\": \"KeepWaiting\"\n        }\n      ],\n      \"Default\": \"Succeed\"\n    },\n    \"TimeoutTask\": {\n      \"Type\": \"Task\",\n      \"TimeoutSeconds\": 1,\n      \"Resource\": \"${085edd942ce144c5bd80364a6e973e4d}\",\n      \"Parameters\": {\n        \"sleepSeconds\": 3\n      },\n      \"Next\": \"Succeed\"\n    },\n    \"KeepWaiting\": {\n      \"Type\": \"Wait\",\n      \"Seconds\": 1,\n      \"Next\": \"KeepWaiting\"\n    },\n    \"Fail\": {\n      \"Type\": \"Fail\"\n    },\n    \"Succeed\": {\n      \"Type\": \"Pass\",\n      \"End\": true\n    }\n  }\n}",
            {
              "085edd942ce144c5bd80364a6e973e4d": {
                "Fn::GetAtt": [
                  "PingLambdaFunction",
                  "Arn"
                ]
              }
            }
          ]
        },
        "RoleArn": {
          "Fn::GetAtt": [
            "WorkflowRole",
            "Arn"
          ]
        },
        "LoggingConfiguration": {
          "Level": "ALL",
          "IncludeExecutionData": true,
          "Destinations": [
            {
              "CloudWatchLogsLogGroup": {
                "LogGroupArn": {
                  "Fn::GetAtt": [
                    "workflowLogGroup",
                    "Arn"
                  ]
                }
              }
            }
          ]
        },
        "StateMachineName": "Workflow"
      },
      "DependsOn": [
        "WorkflowRole"
      ]
    },
    "ExpressWorkflow": {
      "Type": "AWS::StepFunctions::StateMachine",
      "Properties": {
        "DefinitionString": {
          "Fn::Sub": [
            "{\n  \"StartAt\": \"What Next?\",\n  \"States\": {\n    \"What Next?\": {\n      \"Type\": \"Choice\",\n      \"Choices\": [\n        {\n          \"Variable\": \"$.destination\",\n          \"StringEquals\": \"fail\",\n          \"Next\": \"Fail\"\n        },\n        {\n          \"Variable\": \"$.destination\",\n          \"StringEquals\": \"timeoutTask\",\n          \"Next\": \"TimeoutTask\"\n        },\n        {\n          \"Variable\": \"$.destination\",\n          \"StringEquals\": \"keepWaiting\",\n          \"Next\": \"KeepWaiting\"\n        }\n      ],\n      \"Default\": \"Succeed\"\n    },\n    \"TimeoutTask\": {\n      \"Type\": \"Task\",\n      \"TimeoutSeconds\": 1,\n      \"Resource\": \"${085edd942ce144c5bd80364a6e973e4d}\",\n      \"Parameters\": {\n        \"sleepSeconds\": 3\n      },\n      \"Next\": \"Succeed\"\n    },\n    \"KeepWaiting\": {\n      \"Type\": \"Wait\",\n      \"Seconds\": 1,\n      \"Next\": \"KeepWaiting\"\n    },\n    \"Fail\": {\n      \"Type\": \"Fail\"\n    },\n    \"Succeed\": {\n      \"Type\": \"Pass\",\n      \"End\": true\n    }\n  }\n}",
            {
              "085edd942ce144c5bd80364a6e973e4d": {
                "Fn::GetAtt": [
                  "PingLambdaFunction",
                  "Arn"
                ]
              }
            }
          ]
        },
        "RoleArn": {
          "Fn::GetAtt": [
            "ExpressWorkflowRole",
            "Arn"
          ]
        },
        "StateMachineType": "EXPRESS",
        "LoggingConfiguration": {
          "Level": "ALL",
          "IncludeExecutionData": true,
          "Destinations": [
            {
              "CloudWatchLogsLogGroup": {
                "LogGroupArn": {
                  "Fn::GetAtt": [
                    "expressWorkflowLogGroup",
                    "Arn"
                  ]
                }
              }
            }
          ]
        },
        "StateMachineName": "ExpressWorkflow"
      },
      "DependsOn": [
        "ExpressWorkflowRole"
      ]
    },
    "ApiGatewayRestApi": {
      "Type": "AWS::ApiGateway::RestApi",
      "Properties": {
        "Name": "dev-serverless-test-project",
        "EndpointConfiguration": {
          "Types": [
            "REGIONAL"
          ]
        },
        "Policy": ""
      }
    },
    "ApiGatewayResourceItem": {
      "Type": "AWS::ApiGateway::Resource",
      "Properties": {
        "ParentId": {
          "Fn::GetAtt": [
            "ApiGatewayRestApi",
            "RootResourceId"
          ]
        },
        "PathPart": "item",
        "RestApiId": {
          "Ref": "ApiGatewayRestApi"
        }
      }
    },
    "ApiGatewayMethodItemGet": {
      "Type": "AWS::ApiGateway::Method",
      "Properties": {
        "HttpMethod": "GET",
        "RequestParameters": {},
        "ResourceId": {
          "Ref": "ApiGatewayResourceItem"
        },
        "RestApiId": {
          "Ref": "ApiGatewayRestApi"
        },
        "ApiKeyRequired": false,
        "AuthorizationType": "NONE",
        "Integration": {
          "IntegrationHttpMethod": "POST",
          "Type": "AWS_PROXY",
          "Uri": {
            "Fn::Join": [
              "",
              [
                "arn:",
                {
                  "Ref": "AWS::Partition"
                },
                ":apigateway:",
                {
                  "Ref": "AWS::Region"
                },
                ":lambda:path/2015-03-31/functions/",
                {
                  "Fn::GetAtt": [
                    "HttpGetterLambdaFunction",
                    "Arn"
                  ]
                },
                "/invocations"
              ]
            ]
          }
        },
        "MethodResponses": []
      },
      "DependsOn": [
        "HttpGetterLambdaPermissionApiGateway"
      ]
    },
    "ApiGatewayDeployment1653074568829": {
      "Type": "AWS::ApiGateway::Deployment",
      "Properties": {
        "RestApiId": {
          "Ref": "ApiGatewayRestApi"
        },
        "StageName": "dev"
      },
      "DependsOn": [
        "ApiGatewayMethodItemGet"
      ]
    },
    "HttpGetterLambdaPermissionApiGateway": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "FunctionName": {
          "Fn::GetAtt": [
            "HttpGetterLambdaFunction",
            "Arn"
          ]
        },
        "Action": "lambda:InvokeFunction",
        "Principal": "apigateway.amazonaws.com",
        "SourceArn": {
          "Fn::Join": [
            "",
            [
              "arn:",
              {
                "Ref": "AWS::Partition"
              },
              ":execute-api:",
              {
                "Ref": "AWS::Region"
              },
              ":",
              {
                "Ref": "AWS::AccountId"
              },
              ":",
              {
                "Ref": "ApiGatewayRestApi"
              },
              "/*/*"
            ]
          ]
        }
      }
    },
    "StreamProcessorEventSourceMappingKinesisStream": {
      "Type": "AWS::Lambda::EventSourceMapping",
      "DependsOn": [
        "IamRoleLambdaExecution"
      ],
      "Properties": {
        "BatchSize": 10,
        "Enabled": true,
        "EventSourceArn": {
          "Fn::GetAtt": [
            "stream",
            "Arn"
          ]
        },
        "FunctionName": {
          "Fn::GetAtt": [
            "StreamProcessorLambdaFunction",
            "Arn"
          ]
        },
        "StartingPosition": "LATEST",
        "MaximumRetryAttempts": 0
      }
    },
    "stream": {
      "Type": "AWS::Kinesis::Stream",
      "Properties": {
        "Name": "awesome-savage-stream",
        "ShardCount": 1
      }
    },
    "bucket": {
      "Type": "AWS::S3::Bucket",
      "Properties": {
        "BucketName": "awesome-savage-bucket"
      }
    },
    "dataTable": {
      "Type": "AWS::DynamoDB::Table",
      "DeletionPolicy": "Delete",
      "Properties": {
        "TableName": "MyTable",
        "ProvisionedThroughput": {
          "ReadCapacityUnits": 1,
          "WriteCapacityUnits": 1
        },
        "AttributeDefinitions": [
          {
            "AttributeName": "pk",
            "AttributeType": "S"
          },
          {
            "AttributeName": "sk",
            "AttributeType": "S"
          },
          {
            "AttributeName": "gsi1pk",
            "AttributeType": "S"
          },
          {
            "AttributeName": "gsi1sk",
            "AttributeType": "S"
          },
          {
            "AttributeName": "timestamp",
            "AttributeType": "N"
          }
        ],
        "KeySchema": [
          {
            "AttributeName": "pk",
            "KeyType": "HASH"
          },
          {
            "AttributeName": "sk",
            "KeyType": "RANGE"
          }
        ],
        "GlobalSecondaryIndexes": [
          {
            "IndexName": "GSI1",
            "ProvisionedThroughput": {
              "ReadCapacityUnits": 1,
              "WriteCapacityUnits": 1
            },
            "KeySchema": [
              {
                "AttributeName": "gsi1pk",
                "KeyType": "HASH"
              },
              {
                "AttributeName": "gsi1sk",
                "KeyType": "RANGE"
              }
            ],
            "Projection": {
              "NonKeyAttributes": [
                "address"
              ],
              "ProjectionType": "INCLUDE"
            }
          }
        ],
        "LocalSecondaryIndexes": [
          {
            "IndexName": "LSI1",
            "KeySchema": [
              {
                "AttributeName": "pk",
                "KeyType": "HASH"
              },
              {
                "AttributeName": "timestamp",
                "KeyType": "RANGE"
              }
            ],
            "Projection": {
              "NonKeyAttributes": [
                "name"
              ],
              "ProjectionType": "INCLUDE"
            }
          }
        ]
      }
    },
    "regularQueue": {
      "Type": "AWS::SQS::Queue",
      "Properties": {
        "QueueName": "SomeRegularQueue"
      }
    },
    "fifoQueue": {
      "Type": "AWS::SQS::Queue",
      "Properties": {
        "QueueName": "SomeFifoQueue.fifo",
        "FifoQueue": true
      }
    },
    "workflowLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "WorkflowLogs",
        "RetentionInDays": 1
      }
    },
    "expressWorkflowLogGroup": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": "ExpressWorkflowLogs",
        "RetentionInDays": 1
      }
    },
    "vpc": {
      "Type": "AWS::EC2::VPC",
      "Properties": {
        "CidrBlock": "10.0.0.0/16"
      }
    },
    "subnet": {
      "Type": "AWS::EC2::Subnet",
      "Properties": {
        "AvailabilityZone": "eu-west-1a",
        "CidrBlock": "10.0.16.0/20",
        "VpcId": {
          "Ref": "vpc"
        }
      }
    },
    "ecsCluster": {
      "Type": "AWS::ECS::Cluster",
      "Properties": {
        "ClusterName": "awesome-cluster"
      }
    },
    "ecsService": {
      "Type": "AWS::ECS::Service",
      "Properties": {
        "ServiceName": "awesome-service",
        "Cluster": {
          "Ref": "ecsCluster"
        },
        "DesiredCount": 0,
        "LaunchType": "FARGATE",
        "TaskDefinition": {
          "Ref": "taskDef"
        },
        "NetworkConfiguration": {
          "AwsvpcConfiguration": {
            "AssignPublicIp": "ENABLED",
            "SecurityGroups": [],
            "Subnets": [
              {
                "Ref": "subnet"
              }
            ]
          }
        }
      }
    },
    "taskDef": {
      "Type": "AWS::ECS::TaskDefinition",
      "Properties": {
        "RequiresCompatibilities": [
          "FARGATE"
        ],
        "Cpu": 256,
        "Memory": 512,
        "ContainerDefinitions": [
          {
            "Name": "busybox",
            "Image": "busybox",
            "Cpu": 256,
            "EntryPoint": [
              "sh",
              "-c"
            ],
            "Memory": 512,
            "Command": [
              "/bin/sh -c \"while true; do echo Hello; sleep 10; done\""
            ],
            "Essential": true
          }
        ],
        "NetworkMode": "awsvpc"
      }
    },
    "topic": {
      "Type": "AWS::SNS::Topic",
      "Properties": {
        "TopicName": "awesome-savage-topic"
      }
    },
    "subscription": {
      "Type": "AWS::SNS::Subscription",
      "Properties": {
        "Endpoint": "diren.akkoc@fourtheorem.com",
        "Protocol": "email",
        "TopicArn": {
          "Ref": "topic"
        }
      }
    },
    "ServerlesstestprojectdeveventsRulerule1EventBridgeRule": {
      "Type": "AWS::Events::Rule",
      "Properties": {
        "EventPattern": {
          "detail-type": [
            "Invoke Lambda Function"
          ]
        },
        "Name": "serverless-test-project-dev-eventsRule-rule-1",
        "State": "ENABLED",
        "Targets": [
          {
            "Arn": {
              "Fn::GetAtt": [
                "EventsRuleLambdaFunction",
                "Arn"
              ]
            },
            "Id": "serverless-test-project-dev-eventsRule-rule-1-target",
            "RetryPolicy": {
              "MaximumEventAgeInSeconds": 60,
              "MaximumRetryAttempts": 2
            }
          }
        ]
      }
    }
  },
  "Outputs": {
    "ServerlessDeploymentBucketName": {
      "Value": {
        "Ref": "ServerlessDeploymentBucket"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-ServerlessDeploymentBucketName"
      }
    },
    "HelloLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "HelloLambdaVersion722UxcHK84FtzQksFJLgO33214XN092rFeZxfBAWMI"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-HelloLambdaFunctionQualifiedArn"
      }
    },
    "PingLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "PingLambdaVersionkRCLggFwidyGPubIpsDG3Bz131vjOVNlzKj7NBM8UgE"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-PingLambdaFunctionQualifiedArn"
      }
    },
    "ThrottlerLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "ThrottlerLambdaVersionl91cFljDzhpqWXdQeA2t4nCL4O8S6eewBytew6LYg"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-ThrottlerLambdaFunctionQualifiedArn"
      }
    },
    "DriveStreamLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "DriveStreamLambdaVersionZym9I4CW26PuJ2g26SXA4zCtxJm3jUEOzGB9JSpCIA"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-DriveStreamLambdaFunctionQualifiedArn"
      }
    },
    "DriveQueueLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "DriveQueueLambdaVersionqxLBmX6bkW9KfIv3nK7Euv6IWU2k1LNIfruRKLQ"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-DriveQueueLambdaFunctionQualifiedArn"
      }
    },
    "DriveTableLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "DriveTableLambdaVersionmshp4vuCFXIuqNxokV8OQhvrXhDNTcfJirpkqQC5PM"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-DriveTableLambdaFunctionQualifiedArn"
      }
    },
    "StreamProcessorLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "StreamProcessorLambdaVersionwlUSF2MKmypdz7S8ASUEQJniFQJWYRU4J5ElG6ncY"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-StreamProcessorLambdaFunctionQualifiedArn"
      }
    },
    "HttpGetterLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "HttpGetterLambdaVersion8bkTDhhXsi9cMBh96OfTi3WanBalxcwLoE8XqtXkHcc"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-HttpGetterLambdaFunctionQualifiedArn"
      }
    },
    "WorkflowArn": {
      "Description": "Current StateMachine Arn",
      "Value": {
        "Ref": "Workflow"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-WorkflowArn"
      }
    },
    "ExpressWorkflowArn": {
      "Description": "Current StateMachine Arn",
      "Value": {
        "Ref": "ExpressWorkflow"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-ExpressWorkflowArn"
      }
    },
    "ServiceEndpoint": {
      "Description": "URL of the service endpoint",
      "Value": {
        "Fn::Join": [
          "",
          [
            "https://",
            {
              "Ref": "ApiGatewayRestApi"
            },
            ".execute-api.",
            {
              "Ref": "AWS::Region"
            },
            ".",
            {
              "Ref": "AWS::URLSuffix"
            },
            "/dev"
          ]
        ]
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-ServiceEndpoint"
      }
    },
    "AlbEventLambdaFunctionQualifiedArn": {
      "Description": "Current Lambda function version",
      "Value": {
        "Ref": "AlbEventLambdaVersionhrnQYsD35ePajj2oOiAchLcEoSaZiKn5QmaF0LAeaI4"
      },
      "Export": {
        "Name": "sls-serverless-test-project-dev-AlbEventLambdaFunctionQualifiedArn"
      }
    }
  }
}
