546 lines
17 KiB
JSON
546 lines
17 KiB
JSON
{
|
|
"service": {
|
|
"service": "localstack-lambda",
|
|
"serviceObject": {
|
|
"name": "localstack-lambda"
|
|
},
|
|
"provider": {
|
|
"name": "aws",
|
|
"runtime": "nodejs12.x",
|
|
"stage": "dev",
|
|
"region": "us-east-1",
|
|
"memorySize": 128,
|
|
"variableSyntax": "\\${([^{}:]+?(?:\\(|:)(?:[^:{}][^{}]*?)?)}",
|
|
"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
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"AppLogGroup": {
|
|
"Type": "AWS::Logs::LogGroup",
|
|
"Properties": {
|
|
"LogGroupName": "/aws/lambda/localstack-lambda-dev-app"
|
|
}
|
|
},
|
|
"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": [
|
|
"-",
|
|
[
|
|
"localstack-lambda",
|
|
"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/localstack-lambda-dev*:*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"logs:PutLogEvents"
|
|
],
|
|
"Resource": [
|
|
{
|
|
"Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/localstack-lambda-dev*:*:*"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"Path": "/",
|
|
"RoleName": {
|
|
"Fn::Join": [
|
|
"-",
|
|
[
|
|
"localstack-lambda",
|
|
"dev",
|
|
{
|
|
"Ref": "AWS::Region"
|
|
},
|
|
"lambdaRole"
|
|
]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"AppLambdaFunction": {
|
|
"Type": "AWS::Lambda::Function",
|
|
"Properties": {
|
|
"Code": {
|
|
"S3Bucket": {
|
|
"Ref": "ServerlessDeploymentBucket"
|
|
},
|
|
"S3Key": "serverless/localstack-lambda/dev/1620056787473-2021-05-03T15:46:27.473Z/localstack-lambda.zip"
|
|
},
|
|
"Handler": "api/server.handler",
|
|
"Runtime": "nodejs12.x",
|
|
"FunctionName": "localstack-lambda-dev-app",
|
|
"MemorySize": 128,
|
|
"Timeout": 6,
|
|
"Role": {
|
|
"Fn::GetAtt": [
|
|
"IamRoleLambdaExecution",
|
|
"Arn"
|
|
]
|
|
}
|
|
},
|
|
"DependsOn": [
|
|
"AppLogGroup"
|
|
]
|
|
},
|
|
"AppLambdaVersionpKt6OvdECa0w3L8STXgnFAZzVQXb1lv1UQDQyHZmwu8": {
|
|
"Type": "AWS::Lambda::Version",
|
|
"DeletionPolicy": "Retain",
|
|
"Properties": {
|
|
"FunctionName": {
|
|
"Ref": "AppLambdaFunction"
|
|
},
|
|
"CodeSha256": "ti9O4pTltT2kEw78OJXfrJVusyoy/3C+KWaYQByAA20="
|
|
}
|
|
},
|
|
"ApiGatewayRestApi": {
|
|
"Type": "AWS::ApiGateway::RestApi",
|
|
"Properties": {
|
|
"Name": "dev-localstack-lambda",
|
|
"EndpointConfiguration": {
|
|
"Types": [
|
|
"EDGE"
|
|
]
|
|
},
|
|
"Policy": ""
|
|
}
|
|
},
|
|
"ApiGatewayResourceProxyVar": {
|
|
"Type": "AWS::ApiGateway::Resource",
|
|
"Properties": {
|
|
"ParentId": {
|
|
"Fn::GetAtt": [
|
|
"ApiGatewayRestApi",
|
|
"RootResourceId"
|
|
]
|
|
},
|
|
"PathPart": "{proxy+}",
|
|
"RestApiId": {
|
|
"Ref": "ApiGatewayRestApi"
|
|
}
|
|
}
|
|
},
|
|
"ApiGatewayMethodAny": {
|
|
"Type": "AWS::ApiGateway::Method",
|
|
"Properties": {
|
|
"HttpMethod": "ANY",
|
|
"RequestParameters": {},
|
|
"ResourceId": {
|
|
"Fn::GetAtt": [
|
|
"ApiGatewayRestApi",
|
|
"RootResourceId"
|
|
]
|
|
},
|
|
"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": [
|
|
"AppLambdaFunction",
|
|
"Arn"
|
|
]
|
|
},
|
|
"/invocations"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"MethodResponses": []
|
|
}
|
|
},
|
|
"ApiGatewayMethodProxyVarAny": {
|
|
"Type": "AWS::ApiGateway::Method",
|
|
"Properties": {
|
|
"HttpMethod": "ANY",
|
|
"RequestParameters": {},
|
|
"ResourceId": {
|
|
"Ref": "ApiGatewayResourceProxyVar"
|
|
},
|
|
"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": [
|
|
"AppLambdaFunction",
|
|
"Arn"
|
|
]
|
|
},
|
|
"/invocations"
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"MethodResponses": []
|
|
}
|
|
},
|
|
"ApiGatewayDeployment1620056783201": {
|
|
"Type": "AWS::ApiGateway::Deployment",
|
|
"Properties": {
|
|
"RestApiId": {
|
|
"Ref": "ApiGatewayRestApi"
|
|
},
|
|
"StageName": "dev"
|
|
},
|
|
"DependsOn": [
|
|
"ApiGatewayMethodAny",
|
|
"ApiGatewayMethodProxyVarAny"
|
|
]
|
|
},
|
|
"AppLambdaPermissionApiGateway": {
|
|
"Type": "AWS::Lambda::Permission",
|
|
"Properties": {
|
|
"FunctionName": {
|
|
"Fn::GetAtt": [
|
|
"AppLambdaFunction",
|
|
"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"
|
|
},
|
|
"/*/*"
|
|
]
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Outputs": {
|
|
"ServerlessDeploymentBucketName": {
|
|
"Value": {
|
|
"Ref": "ServerlessDeploymentBucket"
|
|
},
|
|
"Export": {
|
|
"Name": "sls-localstack-lambda-dev-ServerlessDeploymentBucketName"
|
|
}
|
|
},
|
|
"AppLambdaFunctionQualifiedArn": {
|
|
"Description": "Current Lambda function version",
|
|
"Value": {
|
|
"Ref": "AppLambdaVersionpKt6OvdECa0w3L8STXgnFAZzVQXb1lv1UQDQyHZmwu8"
|
|
},
|
|
"Export": {
|
|
"Name": "sls-localstack-lambda-dev-AppLambdaFunctionQualifiedArn"
|
|
}
|
|
},
|
|
"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-localstack-lambda-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": {
|
|
"app": {
|
|
"handler": "api/server.handler",
|
|
"events": [
|
|
{
|
|
"http": "ANY /"
|
|
},
|
|
{
|
|
"http": "ANY {proxy+}"
|
|
}
|
|
],
|
|
"name": "localstack-lambda-dev-app",
|
|
"package": {},
|
|
"memory": 128,
|
|
"timeout": 6,
|
|
"runtime": "nodejs12.x",
|
|
"vpc": {},
|
|
"versionLogicalId": "AppLambdaVersionpKt6OvdECa0w3L8STXgnFAZzVQXb1lv1UQDQyHZmwu8"
|
|
}
|
|
},
|
|
"configValidationMode": "warn",
|
|
"serviceFilename": "serverless.yml",
|
|
"layers": {},
|
|
"initialServerlessConfig": {
|
|
"service": {
|
|
"$ref": "$[\"service\"][\"serviceObject\"]"
|
|
},
|
|
"frameworkVersion": "2",
|
|
"provider": {
|
|
"$ref": "$[\"service\"][\"provider\"]"
|
|
},
|
|
"functions": {
|
|
"$ref": "$[\"service\"][\"functions\"]"
|
|
}
|
|
},
|
|
"isDashboardMonitoringPreconfigured": false,
|
|
"artifact": "/Users/duncanphelps/Documents/Learning/Javascript/sheetaki/sheetaki/.serverless/localstack-lambda.zip"
|
|
},
|
|
"package": {
|
|
"artifactDirectoryName": "serverless/localstack-lambda/dev/1620056787473-2021-05-03T15:46:27.473Z",
|
|
"artifact": "localstack-lambda.zip"
|
|
}
|
|
} |