@@ -26,6 +26,13 @@ Resources:
26
26
MKT_TBL: !Ref AdTrackingTable
27
27
NOTIFICATION_SERVICE: !Ref NotificationServiceFunction
28
28
POI_TBL: !Ref MarketingPoiTable
29
+ Metadata:
30
+ cfn_nag:
31
+ rules_to_suppress:
32
+ - id: "W89"
33
+ reason: "not a valid use case for VPC deployment"
34
+ - id: "W92"
35
+ reason: "not a valid reserved concurrency"
29
36
30
37
LocationBasedMarketingRule:
31
38
Type: "AWS::IoT::TopicRule"
@@ -107,6 +114,10 @@ Resources:
107
114
Type: "AWS::DynamoDB::Table"
108
115
DeletionPolicy: "Delete"
109
116
Properties:
117
+ PointInTimeRecoverySpecification:
118
+ PointInTimeRecoveryEnabled: true
119
+ SSESpecification:
120
+ SSEEnabled: true
110
121
AttributeDefinitions:
111
122
-
112
123
AttributeName: "poi_id"
@@ -121,6 +132,10 @@ Resources:
121
132
Type: "AWS::DynamoDB::Table"
122
133
DeletionPolicy: "Delete"
123
134
Properties:
135
+ PointInTimeRecoverySpecification:
136
+ PointInTimeRecoveryEnabled: true
137
+ SSESpecification:
138
+ SSEEnabled: true
124
139
AttributeDefinitions:
125
140
-
126
141
AttributeName: "trip_id"
@@ -205,7 +220,11 @@ Resources:
205
220
- ClientId: !Ref ConnectedVehicleClient
206
221
ProviderName: !GetAtt ConnectedVehicleUserPool.ProviderName
207
222
AllowUnauthenticatedIdentities: true
208
-
223
+ Metadata:
224
+ cfn_nag:
225
+ rules_to_suppress:
226
+ - id: W57
227
+ reason: "AllowUnauthenticatedIdentities set to true and proper restrictive IAM roles and permissions are established for unauthenticated users"
209
228
210
229
ConnectedVehicleIdentityPoolRoleAttachment:
211
230
Type: "AWS::Cognito::IdentityPoolRoleAttachment"
@@ -1316,6 +1335,13 @@ Resources:
1316
1335
description: Unique user id for the vehicle owner
1317
1336
ApiLogs:
1318
1337
Type: "AWS::Logs::LogGroup"
1338
+ Properties:
1339
+ RetentionInDays: 7
1340
+ Metadata:
1341
+ cfn_nag:
1342
+ rules_to_suppress:
1343
+ - id: "W84"
1344
+ reason: "using service dafault encryption https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/data-protection.html"
1319
1345
1320
1346
ApiGatewayAccountLogsRole:
1321
1347
Type: AWS::IAM::Role
@@ -1349,6 +1375,22 @@ Resources:
1349
1375
DestinationArn: !GetAtt ApiLogs.Arn
1350
1376
Format: $context.identity.sourceIp $context.identity.caller $context.identity.user [$context.requestTime] "$context.httpMethod $context.resourcePath $context.protocol" $context.status $context.responseLength $context.requestId
1351
1377
1378
+ TelemetricsApiUsagePlan:
1379
+ Type: 'AWS::ApiGateway::UsagePlan'
1380
+ DependsOn: TelemetricsApiDeployment
1381
+ Properties:
1382
+ ApiStages:
1383
+ - ApiId: !Ref TelemetricsApi
1384
+ Stage: "prod"
1385
+ Description: Connected Vehicle Telemetrics Api Usage Plan
1386
+ Quota:
1387
+ Limit: 5000
1388
+ Period: MONTH
1389
+ Throttle:
1390
+ BurstLimit: 200
1391
+ RateLimit: 100
1392
+ UsagePlanName: TelemetricsApi-UsagePlan
1393
+
1352
1394
TelemetricsRawStorageRule:
1353
1395
Type: "AWS::IoT::TopicRule"
1354
1396
Properties:
@@ -1557,7 +1599,15 @@ Resources:
1557
1599
Role: !GetAtt JitrServiceRole.Arn
1558
1600
Timeout: 300
1559
1601
MemorySize: 256
1560
-
1602
+ Metadata:
1603
+ cfn_nag:
1604
+ rules_to_suppress:
1605
+ - id: "W89"
1606
+ reason: "not a valid use case for VPC deployment"
1607
+ - id: "W92"
1608
+ reason: "not a valid reserved concurrency"
1609
+ - id: "W58"
1610
+ reason: "CloudWatch logs permission added with custom policy"
1561
1611
AnomalyServiceFunction:
1562
1612
Type: AWS::Lambda::Function
1563
1613
Properties:
@@ -1574,6 +1624,13 @@ Resources:
1574
1624
Variables:
1575
1625
VEHICLE_ANOMALY_TBL: !Ref VehicleAnomalyTable
1576
1626
NOTIFICATION_SERVICE: !Ref NotificationServiceFunction
1627
+ Metadata:
1628
+ cfn_nag:
1629
+ rules_to_suppress:
1630
+ - id: "W89"
1631
+ reason: "not a valid use case for VPC deployment"
1632
+ - id: "W92"
1633
+ reason: "not a valid reserved concurrency"
1577
1634
1578
1635
AnomalyServiceEventSource:
1579
1636
DependsOn: AnomalyServiceFunction
@@ -1602,6 +1659,15 @@ Resources:
1602
1659
VEHICLE_DTC_TBL: !Ref VehicleDtcTable
1603
1660
DTC_TBL: !Ref DtcTable
1604
1661
NOTIFICATION_SERVICE: !Ref NotificationServiceFunction
1662
+ Metadata:
1663
+ cfn_nag:
1664
+ rules_to_suppress:
1665
+ - id: "W89"
1666
+ reason: "not a valid use case for VPC deployment"
1667
+ - id: "W92"
1668
+ reason: "not a valid reserved concurrency"
1669
+ - id: "W58"
1670
+ reason: "CloudWatch logs permission added with custom policy"
1605
1671
1606
1672
NotificationServiceFunction:
1607
1673
Type: AWS::Lambda::Function
@@ -1619,6 +1685,15 @@ Resources:
1619
1685
Variables:
1620
1686
VEHICLE_OWNER_TBL: !Ref VehicleOwnerTable
1621
1687
USER_POOL_ID: !Ref ConnectedVehicleUserPool
1688
+ Metadata:
1689
+ cfn_nag:
1690
+ rules_to_suppress:
1691
+ - id: "W89"
1692
+ reason: "not a valid use case for VPC deployment"
1693
+ - id: "W92"
1694
+ reason: "not a valid reserved concurrency"
1695
+ - id: "W58"
1696
+ reason: "CloudWatch logs permission added with custom policy"
1622
1697
1623
1698
DriverSafetyServiceFunction:
1624
1699
Type: AWS::Lambda::Function
@@ -1636,6 +1711,15 @@ Resources:
1636
1711
Variables:
1637
1712
VEHICLE_TRIP_TBL: !Ref VehicleTripTable
1638
1713
NOTIFICATION_SERVICE: !Ref NotificationServiceFunction
1714
+ Metadata:
1715
+ cfn_nag:
1716
+ rules_to_suppress:
1717
+ - id: "W89"
1718
+ reason: "not a valid use case for VPC deployment"
1719
+ - id: "W92"
1720
+ reason: "not a valid reserved concurrency"
1721
+ - id: "W58"
1722
+ reason: "CloudWatch logs permission added with custom policy"
1639
1723
1640
1724
VehicleServiceFunction:
1641
1725
Type: AWS::Lambda::Function
@@ -1656,6 +1740,15 @@ Resources:
1656
1740
VEHICLE_DTC_TBL: !Ref VehicleDtcTable
1657
1741
HEALTH_REPORT_TBL: !Ref HealthReportTable
1658
1742
VEHICLE_ANOMALY_TBL: !Ref VehicleAnomalyTable
1743
+ Metadata:
1744
+ cfn_nag:
1745
+ rules_to_suppress:
1746
+ - id: "W89"
1747
+ reason: "not a valid use case for VPC deployment"
1748
+ - id: "W92"
1749
+ reason: "not a valid reserved concurrency"
1750
+ - id: "W58"
1751
+ reason: "CloudWatch logs permission added with custom policy"
1659
1752
1660
1753
AnomalyStream:
1661
1754
Type: AWS::Kinesis::Stream
@@ -1675,6 +1768,8 @@ Resources:
1675
1768
Type: AWS::KinesisFirehose::DeliveryStream
1676
1769
Properties:
1677
1770
DeliveryStreamName: "connected-vehicle-telemetry"
1771
+ DeliveryStreamEncryptionConfigurationInput:
1772
+ KeyType: 'AWS_OWNED_CMK'
1678
1773
S3DestinationConfiguration:
1679
1774
BucketARN: !GetAtt TelemetricDataBucket.Arn
1680
1775
BufferingHints:
@@ -2225,6 +2320,10 @@ Resources:
2225
2320
Type: "AWS::DynamoDB::Table"
2226
2321
DeletionPolicy: "Delete"
2227
2322
Properties:
2323
+ PointInTimeRecoverySpecification:
2324
+ PointInTimeRecoveryEnabled: true
2325
+ SSESpecification:
2326
+ SSEEnabled: true
2228
2327
AttributeDefinitions:
2229
2328
-
2230
2329
AttributeName: "vin"
@@ -2245,6 +2344,10 @@ Resources:
2245
2344
Type: "AWS::DynamoDB::Table"
2246
2345
DeletionPolicy: "Delete"
2247
2346
Properties:
2347
+ PointInTimeRecoverySpecification:
2348
+ PointInTimeRecoveryEnabled: true
2349
+ SSESpecification:
2350
+ SSEEnabled: true
2248
2351
AttributeDefinitions:
2249
2352
-
2250
2353
AttributeName: "vin"
@@ -2265,6 +2368,10 @@ Resources:
2265
2368
Type: "AWS::DynamoDB::Table"
2266
2369
DeletionPolicy: "Delete"
2267
2370
Properties:
2371
+ PointInTimeRecoverySpecification:
2372
+ PointInTimeRecoveryEnabled: true
2373
+ SSESpecification:
2374
+ SSEEnabled: true
2268
2375
AttributeDefinitions:
2269
2376
-
2270
2377
AttributeName: "vin"
@@ -2285,6 +2392,10 @@ Resources:
2285
2392
Type: "AWS::DynamoDB::Table"
2286
2393
DeletionPolicy: "Delete"
2287
2394
Properties:
2395
+ PointInTimeRecoverySpecification:
2396
+ PointInTimeRecoveryEnabled: true
2397
+ SSESpecification:
2398
+ SSEEnabled: true
2288
2399
AttributeDefinitions:
2289
2400
-
2290
2401
AttributeName: "vin"
@@ -2318,6 +2429,10 @@ Resources:
2318
2429
Type: "AWS::DynamoDB::Table"
2319
2430
DeletionPolicy: "Delete"
2320
2431
Properties:
2432
+ PointInTimeRecoverySpecification:
2433
+ PointInTimeRecoveryEnabled: true
2434
+ SSESpecification:
2435
+ SSEEnabled: true
2321
2436
AttributeDefinitions:
2322
2437
-
2323
2438
AttributeName: "owner_id"
@@ -2346,6 +2461,10 @@ Resources:
2346
2461
Type: "AWS::DynamoDB::Table"
2347
2462
DeletionPolicy: "Delete"
2348
2463
Properties:
2464
+ PointInTimeRecoverySpecification:
2465
+ PointInTimeRecoveryEnabled: true
2466
+ SSESpecification:
2467
+ SSEEnabled: true
2349
2468
AttributeDefinitions:
2350
2469
-
2351
2470
AttributeName: "dtc"
@@ -2470,7 +2589,13 @@ Resources:
2470
2589
- "Arn"
2471
2590
Runtime: "nodejs12.x"
2472
2591
Timeout: "300"
2473
-
2592
+ Metadata:
2593
+ cfn_nag:
2594
+ rules_to_suppress:
2595
+ - id: "W89"
2596
+ reason: "not a valid use case for VPC deployment"
2597
+ - id: "W92"
2598
+ reason: "not a valid reserved concurrency"
2474
2599
2475
2600
Outputs:
2476
2601
DtcTable:
0 commit comments