serverless-state.json 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. {
  2. "service": {
  3. "service": "hnw-wallpad-etl",
  4. "serviceObject": {
  5. "name": "hnw-wallpad-etl"
  6. },
  7. "provider": {
  8. "name": "aws",
  9. "runtime": "python3.8",
  10. "lambdaHashingVersion": "20201221",
  11. "stage": "dev",
  12. "region": "ap-northeast-2",
  13. "memorySize": 1024,
  14. "timeout": 180,
  15. "iamRoleStatements": [
  16. {
  17. "Effect": "Allow",
  18. "Action": [
  19. "s3:ListBucket",
  20. "s3:GetObject"
  21. ],
  22. "Resource": "arn:aws:s3:::homenetwork-data/*"
  23. },
  24. {
  25. "Effect": "Allow",
  26. "Action": [
  27. "s3:PutObject"
  28. ],
  29. "Resource": "arn:aws:s3:::hdci-wallpad-prep/*"
  30. }
  31. ],
  32. "environment": {
  33. "PREP_BUCKET": "hdci-wallpad-prep"
  34. },
  35. "variableSyntax": "\\${([^{}:]+?(?:\\(|:)(?:[^:{}][^{}]*?)?)}",
  36. "versionFunctions": true,
  37. "compiledCloudFormationTemplate": {
  38. "AWSTemplateFormatVersion": "2010-09-09",
  39. "Description": "The AWS CloudFormation template for this Serverless application",
  40. "Resources": {
  41. "ServerlessDeploymentBucket": {
  42. "Type": "AWS::S3::Bucket",
  43. "Properties": {
  44. "BucketEncryption": {
  45. "ServerSideEncryptionConfiguration": [
  46. {
  47. "ServerSideEncryptionByDefault": {
  48. "SSEAlgorithm": "AES256"
  49. }
  50. }
  51. ]
  52. }
  53. }
  54. },
  55. "ServerlessDeploymentBucketPolicy": {
  56. "Type": "AWS::S3::BucketPolicy",
  57. "Properties": {
  58. "Bucket": {
  59. "Ref": "ServerlessDeploymentBucket"
  60. },
  61. "PolicyDocument": {
  62. "Statement": [
  63. {
  64. "Action": "s3:*",
  65. "Effect": "Deny",
  66. "Principal": "*",
  67. "Resource": [
  68. {
  69. "Fn::Join": [
  70. "",
  71. [
  72. "arn:",
  73. {
  74. "Ref": "AWS::Partition"
  75. },
  76. ":s3:::",
  77. {
  78. "Ref": "ServerlessDeploymentBucket"
  79. },
  80. "/*"
  81. ]
  82. ]
  83. },
  84. {
  85. "Fn::Join": [
  86. "",
  87. [
  88. "arn:",
  89. {
  90. "Ref": "AWS::Partition"
  91. },
  92. ":s3:::",
  93. {
  94. "Ref": "ServerlessDeploymentBucket"
  95. }
  96. ]
  97. ]
  98. }
  99. ],
  100. "Condition": {
  101. "Bool": {
  102. "aws:SecureTransport": false
  103. }
  104. }
  105. }
  106. ]
  107. }
  108. }
  109. },
  110. "PrepDashfLogGroup": {
  111. "Type": "AWS::Logs::LogGroup",
  112. "Properties": {
  113. "LogGroupName": "/aws/lambda/hdci-wallpad-raw-to-prep"
  114. }
  115. },
  116. "IamRoleLambdaExecution": {
  117. "Type": "AWS::IAM::Role",
  118. "Properties": {
  119. "AssumeRolePolicyDocument": {
  120. "Version": "2012-10-17",
  121. "Statement": [
  122. {
  123. "Effect": "Allow",
  124. "Principal": {
  125. "Service": [
  126. "lambda.amazonaws.com"
  127. ]
  128. },
  129. "Action": [
  130. "sts:AssumeRole"
  131. ]
  132. }
  133. ]
  134. },
  135. "Policies": [
  136. {
  137. "PolicyName": {
  138. "Fn::Join": [
  139. "-",
  140. [
  141. "hnw-wallpad-etl",
  142. "dev",
  143. "lambda"
  144. ]
  145. ]
  146. },
  147. "PolicyDocument": {
  148. "Version": "2012-10-17",
  149. "Statement": [
  150. {
  151. "Effect": "Allow",
  152. "Action": [
  153. "logs:CreateLogStream",
  154. "logs:CreateLogGroup"
  155. ],
  156. "Resource": [
  157. {
  158. "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hdci-wallpad-raw-to-prep:*"
  159. }
  160. ]
  161. },
  162. {
  163. "Effect": "Allow",
  164. "Action": [
  165. "logs:PutLogEvents"
  166. ],
  167. "Resource": [
  168. {
  169. "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/hdci-wallpad-raw-to-prep:*:*"
  170. }
  171. ]
  172. },
  173. {
  174. "$ref": "$[\"service\"][\"provider\"][\"iamRoleStatements\"][0]"
  175. },
  176. {
  177. "$ref": "$[\"service\"][\"provider\"][\"iamRoleStatements\"][1]"
  178. }
  179. ]
  180. }
  181. }
  182. ],
  183. "Path": "/",
  184. "RoleName": {
  185. "Fn::Join": [
  186. "-",
  187. [
  188. "hnw-wallpad-etl",
  189. "dev",
  190. {
  191. "Ref": "AWS::Region"
  192. },
  193. "lambdaRole"
  194. ]
  195. ]
  196. }
  197. }
  198. },
  199. "PrepDashfLambdaFunction": {
  200. "Type": "AWS::Lambda::Function",
  201. "Properties": {
  202. "Code": {
  203. "S3Bucket": {
  204. "Ref": "ServerlessDeploymentBucket"
  205. },
  206. "S3Key": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z/preprocess-hdci-wallpad-raw-to-prep.zip"
  207. },
  208. "Handler": "preprocess/lambda_function.lambda_handler",
  209. "Runtime": "python3.8",
  210. "FunctionName": "hdci-wallpad-raw-to-prep",
  211. "MemorySize": 1024,
  212. "Timeout": 180,
  213. "Environment": {
  214. "Variables": {
  215. "PREP_BUCKET": "hdci-wallpad-prep"
  216. }
  217. },
  218. "Role": {
  219. "Fn::GetAtt": [
  220. "IamRoleLambdaExecution",
  221. "Arn"
  222. ]
  223. }
  224. },
  225. "DependsOn": [
  226. "PrepDashfLogGroup"
  227. ]
  228. },
  229. "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY": {
  230. "Type": "AWS::Lambda::Version",
  231. "DeletionPolicy": "Retain",
  232. "Properties": {
  233. "FunctionName": {
  234. "Ref": "PrepDashfLambdaFunction"
  235. },
  236. "CodeSha256": "pzZFpQxx/iOmdihZHN62crmDKmGlSChnGjtFpayNX28="
  237. }
  238. },
  239. "PrepDashfCustomS31": {
  240. "Type": "Custom::S3",
  241. "Version": 1,
  242. "DependsOn": [
  243. "PrepDashfLambdaFunction",
  244. "CustomDashresourceDashexistingDashs3LambdaFunction"
  245. ],
  246. "Properties": {
  247. "ServiceToken": {
  248. "Fn::GetAtt": [
  249. "CustomDashresourceDashexistingDashs3LambdaFunction",
  250. "Arn"
  251. ]
  252. },
  253. "FunctionName": "hdci-wallpad-raw-to-prep",
  254. "BucketName": "homenetwork-data",
  255. "BucketConfigs": [
  256. {
  257. "Event": "s3:ObjectCreated:*",
  258. "Rules": []
  259. }
  260. ]
  261. }
  262. },
  263. "IamRoleCustomResourcesLambdaExecution": {
  264. "Type": "AWS::IAM::Role",
  265. "Properties": {
  266. "AssumeRolePolicyDocument": {
  267. "Version": "2012-10-17",
  268. "Statement": [
  269. {
  270. "Effect": "Allow",
  271. "Principal": {
  272. "Service": [
  273. "lambda.amazonaws.com"
  274. ]
  275. },
  276. "Action": [
  277. "sts:AssumeRole"
  278. ]
  279. }
  280. ]
  281. },
  282. "Policies": [
  283. {
  284. "PolicyName": {
  285. "Fn::Join": [
  286. "-",
  287. [
  288. "dev",
  289. "hnw-wallpad-etl",
  290. "custom-resources-lambda"
  291. ]
  292. ]
  293. },
  294. "PolicyDocument": {
  295. "Version": "2012-10-17",
  296. "Statement": [
  297. {
  298. "Effect": "Allow",
  299. "Resource": {
  300. "Fn::Join": [
  301. ":",
  302. [
  303. "arn",
  304. {
  305. "Ref": "AWS::Partition"
  306. },
  307. "s3",
  308. "",
  309. "",
  310. "homenetwork-data"
  311. ]
  312. ]
  313. },
  314. "Action": [
  315. "s3:PutBucketNotification",
  316. "s3:GetBucketNotification"
  317. ]
  318. },
  319. {
  320. "Effect": "Allow",
  321. "Resource": {
  322. "Fn::Join": [
  323. ":",
  324. [
  325. "arn",
  326. {
  327. "Ref": "AWS::Partition"
  328. },
  329. "lambda",
  330. {
  331. "Ref": "AWS::Region"
  332. },
  333. {
  334. "Ref": "AWS::AccountId"
  335. },
  336. "function",
  337. "*"
  338. ]
  339. ]
  340. },
  341. "Action": [
  342. "lambda:AddPermission",
  343. "lambda:RemovePermission"
  344. ]
  345. }
  346. ]
  347. }
  348. }
  349. ]
  350. }
  351. },
  352. "CustomDashresourceDashexistingDashs3LambdaFunction": {
  353. "Type": "AWS::Lambda::Function",
  354. "Properties": {
  355. "Code": {
  356. "S3Bucket": {
  357. "Ref": "ServerlessDeploymentBucket"
  358. },
  359. "S3Key": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z/custom-resources.zip"
  360. },
  361. "FunctionName": "hnw-wallpad-etl-undefined-custom-resource-existing-s3",
  362. "Handler": "s3/handler.handler",
  363. "MemorySize": 1024,
  364. "Runtime": "nodejs12.x",
  365. "Timeout": 180,
  366. "Role": {
  367. "Fn::GetAtt": [
  368. "IamRoleCustomResourcesLambdaExecution",
  369. "Arn"
  370. ]
  371. }
  372. },
  373. "DependsOn": [
  374. "IamRoleCustomResourcesLambdaExecution"
  375. ]
  376. }
  377. },
  378. "Outputs": {
  379. "ServerlessDeploymentBucketName": {
  380. "Value": {
  381. "Ref": "ServerlessDeploymentBucket"
  382. }
  383. },
  384. "PrepDashfLambdaFunctionQualifiedArn": {
  385. "Description": "Current Lambda function version",
  386. "Value": {
  387. "Ref": "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY"
  388. }
  389. }
  390. }
  391. },
  392. "coreCloudFormationTemplate": {
  393. "AWSTemplateFormatVersion": "2010-09-09",
  394. "Description": "The AWS CloudFormation template for this Serverless application",
  395. "Resources": {
  396. "ServerlessDeploymentBucket": {
  397. "Type": "AWS::S3::Bucket",
  398. "Properties": {
  399. "BucketEncryption": {
  400. "ServerSideEncryptionConfiguration": [
  401. {
  402. "ServerSideEncryptionByDefault": {
  403. "SSEAlgorithm": "AES256"
  404. }
  405. }
  406. ]
  407. }
  408. }
  409. },
  410. "ServerlessDeploymentBucketPolicy": {
  411. "Type": "AWS::S3::BucketPolicy",
  412. "Properties": {
  413. "Bucket": {
  414. "Ref": "ServerlessDeploymentBucket"
  415. },
  416. "PolicyDocument": {
  417. "Statement": [
  418. {
  419. "Action": "s3:*",
  420. "Effect": "Deny",
  421. "Principal": "*",
  422. "Resource": [
  423. {
  424. "Fn::Join": [
  425. "",
  426. [
  427. "arn:",
  428. {
  429. "Ref": "AWS::Partition"
  430. },
  431. ":s3:::",
  432. {
  433. "Ref": "ServerlessDeploymentBucket"
  434. },
  435. "/*"
  436. ]
  437. ]
  438. },
  439. {
  440. "Fn::Join": [
  441. "",
  442. [
  443. "arn:",
  444. {
  445. "Ref": "AWS::Partition"
  446. },
  447. ":s3:::",
  448. {
  449. "Ref": "ServerlessDeploymentBucket"
  450. }
  451. ]
  452. ]
  453. }
  454. ],
  455. "Condition": {
  456. "Bool": {
  457. "aws:SecureTransport": false
  458. }
  459. }
  460. }
  461. ]
  462. }
  463. }
  464. }
  465. },
  466. "Outputs": {
  467. "ServerlessDeploymentBucketName": {
  468. "Value": {
  469. "Ref": "ServerlessDeploymentBucket"
  470. }
  471. }
  472. }
  473. },
  474. "vpc": {}
  475. },
  476. "custom": {
  477. "UPLOAD_BUCKET": "hnw-wallpad-etl-dev",
  478. "bucket": "hnw-wallpad-etl-dev",
  479. "pythonRequirements": {
  480. "slim": true,
  481. "useStaticCache": true,
  482. "useDownloadCache": true,
  483. "cacheLocation": "./._cache",
  484. "staticCacheMaxVersions": 10,
  485. "noDeploy": [
  486. "pip",
  487. "setuptools",
  488. "boto3",
  489. "botocore",
  490. "dateutil",
  491. "docutils",
  492. "jmespath",
  493. "python_dateutil",
  494. "s3transfer",
  495. "six",
  496. "urllib3"
  497. ],
  498. "dockerizePip": "non-linux"
  499. }
  500. },
  501. "plugins": [
  502. "serverless-python-requirements"
  503. ],
  504. "pluginsData": {},
  505. "functions": {
  506. "prep-f": {
  507. "handler": "preprocess/lambda_function.lambda_handler",
  508. "module": "preprocess",
  509. "name": "hdci-wallpad-raw-to-prep",
  510. "events": [
  511. {
  512. "s3": {
  513. "bucket": "homenetwork-data",
  514. "event": "s3:ObjectCreated:*",
  515. "existing": true
  516. }
  517. }
  518. ],
  519. "package": {
  520. "artifact": ".serverless\\preprocess-hdci-wallpad-raw-to-prep.zip"
  521. },
  522. "memory": 1024,
  523. "timeout": 180,
  524. "runtime": "python3.8",
  525. "vpc": {},
  526. "versionLogicalId": "PrepDashfLambdaVersion6kG0JfRlaV9PcfPIfqXoZs7UXmFownZER3v6tOps6iY"
  527. }
  528. },
  529. "configValidationMode": "warn",
  530. "serviceFilename": "serverless.yml",
  531. "layers": {},
  532. "initialServerlessConfig": {
  533. "service": {
  534. "$ref": "$[\"service\"][\"serviceObject\"]"
  535. },
  536. "plugins": {
  537. "$ref": "$[\"service\"][\"plugins\"]"
  538. },
  539. "provider": {
  540. "$ref": "$[\"service\"][\"provider\"]"
  541. },
  542. "package": {
  543. "individually": true,
  544. "exclude": [
  545. "**/requirements.txt",
  546. "venv/**"
  547. ],
  548. "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z"
  549. },
  550. "custom": {
  551. "$ref": "$[\"service\"][\"custom\"]"
  552. },
  553. "functions": {
  554. "$ref": "$[\"service\"][\"functions\"]"
  555. }
  556. },
  557. "isDashboardMonitoringPreconfigured": false
  558. },
  559. "package": {
  560. "individually": true,
  561. "artifactDirectoryName": "serverless/hnw-wallpad-etl/dev/1617779857545-2021-04-07T07:17:37.545Z",
  562. "artifact": ""
  563. }
  564. }