{ "service": { "service": "hnw-wallpad-etl", "serviceObject": { "name": "hnw-wallpad-etl" }, "provider": { "name": "aws", "runtime": "python3.8", "lambdaHashingVersion": "20201221", "stage": "dev", "region": "ap-northeast-2", "memorySize": 1024, "timeout": 180, "iamRoleStatements": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetObject" ], "Resource": "arn:aws:s3:::homenetwork-data/*" }, { "Effect": "Allow", "Action": [ "s3:PutObject" ], "Resource": "arn:aws:s3:::hdci-wallpad-prep/*" } ], "environment": { "PREP_BUCKET": "hdci-wallpad-prep" }, "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 } } } ] } } }, "PrepDashfLogGroup": { "Type": "AWS::Logs::LogGroup", "Properties": { "LogGroupName": "/aws/lambda/hdci-wallpad-raw-to-prep" } }, "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": [ "-", [ "hnw-wallpad-etl", "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/hdci-wallpad-raw-to-prep:*" } ] }, { "Effect": "Allow", "Action": [ "logs:PutLogEvents" ], "Resource": [ { "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hdci-wallpad-raw-to-prep:*:*" } ] }, { "$ref": "$[\"service\"][\"provider\"][\"iamRoleStatements\"][0]" }, { "$ref": "$[\"service\"][\"provider\"][\"iamRoleStatements\"][1]" } ] } } ], "Path": "/", "RoleName": { "Fn::Join": [ "-", [ "hnw-wallpad-etl", "dev", { "Ref": "AWS::Region" }, "lambdaRole" ] ] } } }, "PrepDashfLambdaFunction": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Ref": "ServerlessDeploymentBucket" }, "S3Key": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z/preprocess-hdci-wallpad-raw-to-prep.zip" }, "Handler": "preprocess/lambda_function.lambda_handler", "Runtime": "python3.8", "FunctionName": "hdci-wallpad-raw-to-prep", "MemorySize": 1024, "Timeout": 180, "Environment": { "Variables": { "PREP_BUCKET": "hdci-wallpad-prep" } }, "Role": { "Fn::GetAtt": [ "IamRoleLambdaExecution", "Arn" ] } }, "DependsOn": [ "PrepDashfLogGroup" ] }, "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY": { "Type": "AWS::Lambda::Version", "DeletionPolicy": "Retain", "Properties": { "FunctionName": { "Ref": "PrepDashfLambdaFunction" }, "CodeSha256": "pzZFpQxx/iOmdihZHN62crmDKmGlSChnGjtFpayNX28=" } }, "PrepDashfCustomS31": { "Type": "Custom::S3", "Version": 1, "DependsOn": [ "PrepDashfLambdaFunction", "CustomDashresourceDashexistingDashs3LambdaFunction" ], "Properties": { "ServiceToken": { "Fn::GetAtt": [ "CustomDashresourceDashexistingDashs3LambdaFunction", "Arn" ] }, "FunctionName": "hdci-wallpad-raw-to-prep", "BucketName": "homenetwork-data", "BucketConfigs": [ { "Event": "s3:ObjectCreated:*", "Rules": [] } ] } }, "IamRoleCustomResourcesLambdaExecution": { "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": [ "-", [ "dev", "hnw-wallpad-etl", "custom-resources-lambda" ] ] }, "PolicyDocument": { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Resource": { "Fn::Join": [ ":", [ "arn", { "Ref": "AWS::Partition" }, "s3", "", "", "homenetwork-data" ] ] }, "Action": [ "s3:PutBucketNotification", "s3:GetBucketNotification" ] }, { "Effect": "Allow", "Resource": { "Fn::Join": [ ":", [ "arn", { "Ref": "AWS::Partition" }, "lambda", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "function", "*" ] ] }, "Action": [ "lambda:AddPermission", "lambda:RemovePermission" ] } ] } } ] } }, "CustomDashresourceDashexistingDashs3LambdaFunction": { "Type": "AWS::Lambda::Function", "Properties": { "Code": { "S3Bucket": { "Ref": "ServerlessDeploymentBucket" }, "S3Key": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z/custom-resources.zip" }, "FunctionName": "hnw-wallpad-etl-undefined-custom-resource-existing-s3", "Handler": "s3/handler.handler", "MemorySize": 1024, "Runtime": "nodejs12.x", "Timeout": 180, "Role": { "Fn::GetAtt": [ "IamRoleCustomResourcesLambdaExecution", "Arn" ] } }, "DependsOn": [ "IamRoleCustomResourcesLambdaExecution" ] } }, "Outputs": { "ServerlessDeploymentBucketName": { "Value": { "Ref": "ServerlessDeploymentBucket" } }, "PrepDashfLambdaFunctionQualifiedArn": { "Description": "Current Lambda function version", "Value": { "Ref": "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY" } } } }, "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": {} }, "custom": { "UPLOAD_BUCKET": "hnw-wallpad-etl-dev", "bucket": "hnw-wallpad-etl-dev", "pythonRequirements": { "slim": true, "useStaticCache": true, "useDownloadCache": true, "cacheLocation": "./._cache", "staticCacheMaxVersions": 10, "noDeploy": [ "pip", "setuptools", "boto3", "botocore", "dateutil", "docutils", "jmespath", "python_dateutil", "s3transfer", "six", "urllib3" ], "dockerizePip": "non-linux" } }, "plugins": [ "serverless-python-requirements" ], "pluginsData": {}, "functions": { "prep-f": { "handler": "preprocess/lambda_function.lambda_handler", "module": "preprocess", "name": "hdci-wallpad-raw-to-prep", "events": [ { "s3": { "bucket": "homenetwork-data", "event": "s3:ObjectCreated:*", "existing": true } } ], "package": { "artifact": ".serverless\\preprocess-hdci-wallpad-raw-to-prep.zip" }, "memory": 1024, "timeout": 180, "runtime": "python3.8", "vpc": {}, "versionLogicalId": "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY" } }, "configValidationMode": "warn", "serviceFilename": "serverless.yml", "layers": {}, "initialServerlessConfig": { "service": { "$ref": "$[\"service\"][\"serviceObject\"]" }, "plugins": { "$ref": "$[\"service\"][\"plugins\"]" }, "provider": { "$ref": "$[\"service\"][\"provider\"]" }, "package": { "individually": true, "exclude": [ "**/requirements.txt", "venv/**" ], "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z" }, "custom": { "$ref": "$[\"service\"][\"custom\"]" }, "functions": { "$ref": "$[\"service\"][\"functions\"]" } }, "isDashboardMonitoringPreconfigured": false }, "package": { "individually": true, "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z", "artifact": "" } }