{ "service": { "service": "crystal-hello-world", "serviceObject": { "name": "crystal-hello-world" }, "provider": { "name": "aws", "runtime": "provided", "stage": "dev", "region": "us-east-1", "versionFunctions": true, "compiledCloudFormationTemplate": { "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 } } } ] } } }, "HttpeventLogGroup": { "Type": "AWS::Logs::LogGroup", "Properties": { "LogGroupName": "/aws/lambda/crystal-hello-world-dev-httpevent" } }, "SnseventLogGroup": { "Type": "AWS::Logs::LogGroup", "Properties": { "LogGroupName": "/aws/lambda/crystal-hello-world-dev-snsevent" } }, "ScheduledeventLogGroup": { "Type": "AWS::Logs::LogGroup", "Properties": { "LogGroupName": "/aws/lambda/crystal-hello-world-dev-scheduledevent" } }, "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": [ "-", [ "crystal-hello-world", "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/crystal-hello-world-dev*:*" } ] }, { "Effect": "Allow", "Action": [ "logs:PutLogEvents" ], "Resource": [ { "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/crystal-hello-world-dev*:*:*" } ] } ] } } ], "Path": "/", "RoleName": { "Fn::Join": [ "-", [ "crystal-hello-world", "dev", { "Ref": "AWS::Region" }, "lambdaRole" ] ] } } }, "HttpeventLambdaFunction": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Ref": "ServerlessDeploymentBucket" }, "S3Key": "serverless/crystal-hello-world/dev/1672490172928-2022-12-31T12:36:12.928Z/bootstrap.zip" }, "Handler": "httpevent", "Runtime": "provided", "FunctionName": "crystal-hello-world-dev-httpevent", "MemorySize": 128, "Timeout": 6, "Role": { "Fn::GetAtt": [ "IamRoleLambdaExecution", "Arn" ] } }, "DependsOn": [ "HttpeventLogGroup" ] }, "SnseventLambdaFunction": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Ref": "ServerlessDeploymentBucket" }, "S3Key": "serverless/crystal-hello-world/dev/1672490172928-2022-12-31T12:36:12.928Z/bootstrap.zip" }, "Handler": "snsevent", "Runtime": "provided", "FunctionName": "crystal-hello-world-dev-snsevent", "MemorySize": 128, "Timeout": 6, "Role": { "Fn::GetAtt": [ "IamRoleLambdaExecution", "Arn" ] } }, "DependsOn": [ "SnseventLogGroup" ] }, "ScheduledeventLambdaFunction": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Ref": "ServerlessDeploymentBucket" }, "S3Key": "serverless/crystal-hello-world/dev/1672490172928-2022-12-31T12:36:12.928Z/bootstrap.zip" }, "Handler": "scheduledevent", "Runtime": "provided", "FunctionName": "crystal-hello-world-dev-scheduledevent", "MemorySize": 128, "Timeout": 6, "Role": { "Fn::GetAtt": [ "IamRoleLambdaExecution", "Arn" ] } }, "DependsOn": [ "ScheduledeventLogGroup" ] }, "HttpeventLambdaVersionWDLJr8db8EU8aEoivnxMO4jy6z9alghLSU5sIIw": { "Type": "AWS::Lambda::Version", "DeletionPolicy": "Retain", "Properties": { "FunctionName": { "Ref": "HttpeventLambdaFunction" }, "CodeSha256": "ppKlEO7DXSuR/Gfs8atf6GKfn4UB3c207HDql/qQ9dg=" } }, "SnseventLambdaVersionM2TjBJqnW65kOAhOiyznmnYGoc03qbY7SPUdcKROpOM": { "Type": "AWS::Lambda::Version", "DeletionPolicy": "Retain", "Properties": { "FunctionName": { "Ref": "SnseventLambdaFunction" }, "CodeSha256": "ppKlEO7DXSuR/Gfs8atf6GKfn4UB3c207HDql/qQ9dg=" } }, "ScheduledeventLambdaVersionUbODwrl8fLQE64NPR0OwSduWQBfBBREnT7YlyjYFU": { "Type": "AWS::Lambda::Version", "DeletionPolicy": "Retain", "Properties": { "FunctionName": { "Ref": "ScheduledeventLambdaFunction" }, "CodeSha256": "ppKlEO7DXSuR/Gfs8atf6GKfn4UB3c207HDql/qQ9dg=" } }, "ScheduledeventEventsRuleSchedule1": { "Type": "AWS::Events::Rule", "Properties": { "ScheduleExpression": "rate(10 minutes)", "State": "ENABLED", "Targets": [ { "Input": "{\"hello\":\"world\"}", "Arn": { "Fn::GetAtt": [ "ScheduledeventLambdaFunction", "Arn" ] }, "Id": "scheduledeventSchedule" } ] } }, "ScheduledeventLambdaPermissionEventsRuleSchedule1": { "Type": "AWS::Lambda::Permission", "Properties": { "FunctionName": { "Fn::GetAtt": [ "ScheduledeventLambdaFunction", "Arn" ] }, "Action": "lambda:InvokeFunction", "Principal": "events.amazonaws.com", "SourceArn": { "Fn::GetAtt": [ "ScheduledeventEventsRuleSchedule1", "Arn" ] } } }, "ApiGatewayRestApi": { "Type": "AWS::ApiGateway::RestApi", "Properties": { "Name": "dev-crystal-hello-world", "EndpointConfiguration": { "Types": [ "EDGE" ] }, "Policy": "" } }, "ApiGatewayResourceHello": { "Type": "AWS::ApiGateway::Resource", "Properties": { "ParentId": { "Fn::GetAtt": [ "ApiGatewayRestApi", "RootResourceId" ] }, "PathPart": "hello", "RestApiId": { "Ref": "ApiGatewayRestApi" } } }, "ApiGatewayMethodHelloGet": { "Type": "AWS::ApiGateway::Method", "Properties": { "HttpMethod": "GET", "RequestParameters": {}, "ResourceId": { "Ref": "ApiGatewayResourceHello" }, "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": [ "HttpeventLambdaFunction", "Arn" ] }, "/invocations" ] ] } }, "MethodResponses": [] }, "DependsOn": [ "HttpeventLambdaPermissionApiGateway" ] }, "ApiGatewayDeployment1672490172356": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "RestApiId": { "Ref": "ApiGatewayRestApi" }, "StageName": "dev" }, "DependsOn": [ "ApiGatewayMethodHelloGet" ] }, "HttpeventLambdaPermissionApiGateway": { "Type": "AWS::Lambda::Permission", "Properties": { "FunctionName": { "Fn::GetAtt": [ "HttpeventLambdaFunction", "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" }, "/*/*" ] ] } } }, "SNSTopicMysnstopic": { "Type": "AWS::SNS::Topic", "Properties": { "TopicName": "my-sns-topic", "Subscription": [ { "Endpoint": { "Fn::GetAtt": [ "SnseventLambdaFunction", "Arn" ] }, "Protocol": "lambda" } ] } }, "SnseventLambdaPermissionMysnstopicSNS": { "Type": "AWS::Lambda::Permission", "Properties": { "FunctionName": { "Fn::GetAtt": [ "SnseventLambdaFunction", "Arn" ] }, "Action": "lambda:InvokeFunction", "Principal": "sns.amazonaws.com", "SourceArn": { "Fn::Join": [ "", [ "arn:", { "Ref": "AWS::Partition" }, ":sns:", { "Ref": "AWS::Region" }, ":", { "Ref": "AWS::AccountId" }, ":", "my-sns-topic" ] ] } } } }, "Outputs": { "ServerlessDeploymentBucketName": { "Value": { "Ref": "ServerlessDeploymentBucket" }, "Export": { "Name": "sls-crystal-hello-world-dev-ServerlessDeploymentBucketName" } }, "HttpeventLambdaFunctionQualifiedArn": { "Description": "Current Lambda function version", "Value": { "Ref": "HttpeventLambdaVersionWDLJr8db8EU8aEoivnxMO4jy6z9alghLSU5sIIw" }, "Export": { "Name": "sls-crystal-hello-world-dev-HttpeventLambdaFunctionQualifiedArn" } }, "SnseventLambdaFunctionQualifiedArn": { "Description": "Current Lambda function version", "Value": { "Ref": "SnseventLambdaVersionM2TjBJqnW65kOAhOiyznmnYGoc03qbY7SPUdcKROpOM" }, "Export": { "Name": "sls-crystal-hello-world-dev-SnseventLambdaFunctionQualifiedArn" } }, "ScheduledeventLambdaFunctionQualifiedArn": { "Description": "Current Lambda function version", "Value": { "Ref": "ScheduledeventLambdaVersionUbODwrl8fLQE64NPR0OwSduWQBfBBREnT7YlyjYFU" }, "Export": { "Name": "sls-crystal-hello-world-dev-ScheduledeventLambdaFunctionQualifiedArn" } }, "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-crystal-hello-world-dev-ServiceEndpoint" } } } }, "coreCloudFormationTemplate": { "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 } } } ] } } } }, "Outputs": { "ServerlessDeploymentBucketName": { "Value": { "Ref": "ServerlessDeploymentBucket" } } } }, "vpc": {} }, "pluginsData": {}, "functions": { "httpevent": { "handler": "httpevent", "memorySize": 128, "events": [ { "http": { "path": "hello", "method": "get", "integration": "AWS_PROXY" } } ], "name": "crystal-hello-world-dev-httpevent", "package": {}, "memory": 128, "timeout": 6, "runtime": "provided", "vpc": {}, "versionLogicalId": "HttpeventLambdaVersionWDLJr8db8EU8aEoivnxMO4jy6z9alghLSU5sIIw" }, "snsevent": { "handler": "snsevent", "memorySize": 128, "events": [ { "sns": "my-sns-topic" } ], "name": "crystal-hello-world-dev-snsevent", "package": {}, "memory": 128, "timeout": 6, "runtime": "provided", "vpc": {}, "versionLogicalId": "SnseventLambdaVersionM2TjBJqnW65kOAhOiyznmnYGoc03qbY7SPUdcKROpOM" }, "scheduledevent": { "handler": "scheduledevent", "memorySize": 128, "events": [ { "schedule": { "rate": [ "rate(10 minutes)" ], "input": { "hello": "world" } } } ], "name": "crystal-hello-world-dev-scheduledevent", "package": {}, "memory": 128, "timeout": 6, "runtime": "provided", "vpc": {}, "versionLogicalId": "ScheduledeventLambdaVersionUbODwrl8fLQE64NPR0OwSduWQBfBBREnT7YlyjYFU" } }, "configValidationMode": "warn", "serviceFilename": "serverless.yml", "initialServerlessConfig": { "service": "crystal-hello-world", "provider": { "$ref": "$[\"service\"][\"provider\"]" }, "package": { "artifact": "./bootstrap.zip", "artifactsS3KeyDirname": "serverless/crystal-hello-world/dev/code-artifacts", "artifactDirectoryName": "serverless/crystal-hello-world/dev/1672490172928-2022-12-31T12:36:12.928Z" }, "functions": { "$ref": "$[\"service\"][\"functions\"]" } }, "layers": {}, "isDashboardMonitoringPreconfigured": false }, "package": { "artifactDirectoryName": "serverless/crystal-hello-world/dev/1672490172928-2022-12-31T12:36:12.928Z", "artifact": "bootstrap.zip" } }