|
@@ -7,6 +7,7 @@
|
|
|
"provider": {
|
|
|
"name": "aws",
|
|
|
"runtime": "python3.8",
|
|
|
+ "lambdaHashingVersion": "20201221",
|
|
|
"stage": "dev",
|
|
|
"region": "ap-northeast-2",
|
|
|
"memorySize": 1024,
|
|
@@ -15,11 +16,22 @@
|
|
|
{
|
|
|
"Effect": "Allow",
|
|
|
"Action": [
|
|
|
- "s3:*"
|
|
|
+ "s3:ListBucket",
|
|
|
+ "s3:GetObject"
|
|
|
],
|
|
|
- "Resource": "arn:aws:s3:::homenetwork-data*"
|
|
|
+ "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": {
|
|
@@ -95,16 +107,10 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- "TestDashosLogGroup": {
|
|
|
- "Type": "AWS::Logs::LogGroup",
|
|
|
- "Properties": {
|
|
|
- "LogGroupName": "/aws/lambda/hnw-wallpad-etl-dev-test-os"
|
|
|
- }
|
|
|
- },
|
|
|
"PrepDashfLogGroup": {
|
|
|
"Type": "AWS::Logs::LogGroup",
|
|
|
"Properties": {
|
|
|
- "LogGroupName": "/aws/lambda/hdci-wallpad-raw-to-consumpt"
|
|
|
+ "LogGroupName": "/aws/lambda/hdci-wallpad-raw-to-prep"
|
|
|
}
|
|
|
},
|
|
|
"IamRoleLambdaExecution": {
|
|
@@ -149,10 +155,7 @@
|
|
|
],
|
|
|
"Resource": [
|
|
|
{
|
|
|
- "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hdci-wallpad-raw-to-consumpt:*"
|
|
|
- },
|
|
|
- {
|
|
|
- "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hnw-wallpad-etl-dev*:*"
|
|
|
+ "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hdci-wallpad-raw-to-prep:*"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
@@ -163,15 +166,15 @@
|
|
|
],
|
|
|
"Resource": [
|
|
|
{
|
|
|
- "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hdci-wallpad-raw-to-consumpt:*:*"
|
|
|
- },
|
|
|
- {
|
|
|
- "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hnw-wallpad-etl-dev*:*:*"
|
|
|
+ "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]"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -193,31 +196,6 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- "TestDashosLambdaFunction": {
|
|
|
- "Type": "AWS::Lambda::Function",
|
|
|
- "Properties": {
|
|
|
- "Code": {
|
|
|
- "S3Bucket": {
|
|
|
- "Ref": "ServerlessDeploymentBucket"
|
|
|
- },
|
|
|
- "S3Key": "serverless/hnw-wallpad-etl/dev/1617672916005-2021-04-06T01:35:16.005Z/test-os.zip"
|
|
|
- },
|
|
|
- "Handler": "handler.main",
|
|
|
- "Runtime": "python3.8",
|
|
|
- "FunctionName": "hnw-wallpad-etl-dev-test-os",
|
|
|
- "MemorySize": 1024,
|
|
|
- "Timeout": 180,
|
|
|
- "Role": {
|
|
|
- "Fn::GetAtt": [
|
|
|
- "IamRoleLambdaExecution",
|
|
|
- "Arn"
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- "DependsOn": [
|
|
|
- "TestDashosLogGroup"
|
|
|
- ]
|
|
|
- },
|
|
|
"PrepDashfLambdaFunction": {
|
|
|
"Type": "AWS::Lambda::Function",
|
|
|
"Properties": {
|
|
@@ -225,13 +203,18 @@
|
|
|
"S3Bucket": {
|
|
|
"Ref": "ServerlessDeploymentBucket"
|
|
|
},
|
|
|
- "S3Key": "serverless/hnw-wallpad-etl/dev/1617672916005-2021-04-06T01:35:16.005Z/preprocess-hdci-wallpad-raw-to-consumpt.zip"
|
|
|
+ "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-consumpt",
|
|
|
+ "FunctionName": "hdci-wallpad-raw-to-prep",
|
|
|
"MemorySize": 1024,
|
|
|
"Timeout": 180,
|
|
|
+ "Environment": {
|
|
|
+ "Variables": {
|
|
|
+ "PREP_BUCKET": "hdci-wallpad-prep"
|
|
|
+ }
|
|
|
+ },
|
|
|
"Role": {
|
|
|
"Fn::GetAtt": [
|
|
|
"IamRoleLambdaExecution",
|
|
@@ -243,24 +226,14 @@
|
|
|
"PrepDashfLogGroup"
|
|
|
]
|
|
|
},
|
|
|
- "TestDashosLambdaVersionAbMY2W421EV7Onbqh1U3velQvEWnt8Xz9joty1rhuDk": {
|
|
|
- "Type": "AWS::Lambda::Version",
|
|
|
- "DeletionPolicy": "Retain",
|
|
|
- "Properties": {
|
|
|
- "FunctionName": {
|
|
|
- "Ref": "TestDashosLambdaFunction"
|
|
|
- },
|
|
|
- "CodeSha256": "h5R5cTSRBhXaR8NKeYHgDTvM1SjLJ0zZd9RqBBRL81Q="
|
|
|
- }
|
|
|
- },
|
|
|
- "PrepDashfLambdaVersionOivXBbd96ShcQRZiAZWj8yDOP9YhLHKHFKRrwPoW7Y": {
|
|
|
+ "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY": {
|
|
|
"Type": "AWS::Lambda::Version",
|
|
|
"DeletionPolicy": "Retain",
|
|
|
"Properties": {
|
|
|
"FunctionName": {
|
|
|
"Ref": "PrepDashfLambdaFunction"
|
|
|
},
|
|
|
- "CodeSha256": "uFdeqlWzPgDniaXKgNQCyJdCfevjHzxrbAllyupe/i0="
|
|
|
+ "CodeSha256": "pzZFpQxx/iOmdihZHN62crmDKmGlSChnGjtFpayNX28="
|
|
|
}
|
|
|
},
|
|
|
"PrepDashfCustomS31": {
|
|
@@ -277,7 +250,7 @@
|
|
|
"Arn"
|
|
|
]
|
|
|
},
|
|
|
- "FunctionName": "hdci-wallpad-raw-to-consumpt",
|
|
|
+ "FunctionName": "hdci-wallpad-raw-to-prep",
|
|
|
"BucketName": "homenetwork-data",
|
|
|
"BucketConfigs": [
|
|
|
{
|
|
@@ -383,7 +356,7 @@
|
|
|
"S3Bucket": {
|
|
|
"Ref": "ServerlessDeploymentBucket"
|
|
|
},
|
|
|
- "S3Key": "serverless/hnw-wallpad-etl/dev/1617672916005-2021-04-06T01:35:16.005Z/custom-resources.zip"
|
|
|
+ "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",
|
|
@@ -408,16 +381,10 @@
|
|
|
"Ref": "ServerlessDeploymentBucket"
|
|
|
}
|
|
|
},
|
|
|
- "TestDashosLambdaFunctionQualifiedArn": {
|
|
|
- "Description": "Current Lambda function version",
|
|
|
- "Value": {
|
|
|
- "Ref": "TestDashosLambdaVersionAbMY2W421EV7Onbqh1U3velQvEWnt8Xz9joty1rhuDk"
|
|
|
- }
|
|
|
- },
|
|
|
"PrepDashfLambdaFunctionQualifiedArn": {
|
|
|
"Description": "Current Lambda function version",
|
|
|
"Value": {
|
|
|
- "Ref": "PrepDashfLambdaVersionOivXBbd96ShcQRZiAZWj8yDOP9YhLHKHFKRrwPoW7Y"
|
|
|
+ "Ref": "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -536,24 +503,10 @@
|
|
|
],
|
|
|
"pluginsData": {},
|
|
|
"functions": {
|
|
|
- "test-os": {
|
|
|
- "handler": "handler.main",
|
|
|
- "events": [],
|
|
|
- "name": "hnw-wallpad-etl-dev-test-os",
|
|
|
- "module": ".",
|
|
|
- "package": {
|
|
|
- "artifact": "C:\\Users\\icontrols\\PycharmProjects\\hnw_wallpad_etl\\.serverless\\test-os.zip"
|
|
|
- },
|
|
|
- "memory": 1024,
|
|
|
- "timeout": 180,
|
|
|
- "runtime": "python3.8",
|
|
|
- "vpc": {},
|
|
|
- "versionLogicalId": "TestDashosLambdaVersionAbMY2W421EV7Onbqh1U3velQvEWnt8Xz9joty1rhuDk"
|
|
|
- },
|
|
|
"prep-f": {
|
|
|
"handler": "preprocess/lambda_function.lambda_handler",
|
|
|
"module": "preprocess",
|
|
|
- "name": "hdci-wallpad-raw-to-consumpt",
|
|
|
+ "name": "hdci-wallpad-raw-to-prep",
|
|
|
"events": [
|
|
|
{
|
|
|
"s3": {
|
|
@@ -564,13 +517,13 @@
|
|
|
}
|
|
|
],
|
|
|
"package": {
|
|
|
- "artifact": ".serverless\\preprocess-hdci-wallpad-raw-to-consumpt.zip"
|
|
|
+ "artifact": ".serverless\\preprocess-hdci-wallpad-raw-to-prep.zip"
|
|
|
},
|
|
|
"memory": 1024,
|
|
|
"timeout": 180,
|
|
|
"runtime": "python3.8",
|
|
|
"vpc": {},
|
|
|
- "versionLogicalId": "PrepDashfLambdaVersionOivXBbd96ShcQRZiAZWj8yDOP9YhLHKHFKRrwPoW7Y"
|
|
|
+ "versionLogicalId": "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY"
|
|
|
}
|
|
|
},
|
|
|
"configValidationMode": "warn",
|
|
@@ -592,7 +545,7 @@
|
|
|
"**/requirements.txt",
|
|
|
"venv/**"
|
|
|
],
|
|
|
- "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617672916005-2021-04-06T01:35:16.005Z"
|
|
|
+ "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z"
|
|
|
},
|
|
|
"custom": {
|
|
|
"$ref": "$[\"service\"][\"custom\"]"
|
|
@@ -605,7 +558,7 @@
|
|
|
},
|
|
|
"package": {
|
|
|
"individually": true,
|
|
|
- "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617672916005-2021-04-06T01:35:16.005Z",
|
|
|
+ "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z",
|
|
|
"artifact": ""
|
|
|
}
|
|
|
}
|