Skip to content

Commit 463e9bc

Browse files
committed
chore: update memory size and timeout settings in template files
1 parent defe78b commit 463e9bc

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

unicorn_contracts/template.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Metadata:
1515
- WS2001 # Rule disabled because check does not support !ToJsonString transform
1616
- ES1001 # Rule disabled because our Lambda functions don't need DestinationConfig.OnFailure
1717
- W3002 # Rule disabled as nested templates are being packaged
18-
- E0002
1918
- E3030 # Rule disabled due to using cfn-lint-serverless rules v0.3
2019
- E3002 # Rule disabled due to using cfn-lint-serverless rules v0.3
2120

@@ -48,8 +47,8 @@ Globals:
4847
OpenApiVersion: 3.0.1
4948
Function:
5049
Runtime: python3.12
51-
MemorySize: 128
52-
Timeout: 3
50+
MemorySize: 512
51+
Timeout: 15
5352
Tracing: Active
5453
Architectures:
5554
- x86_64

unicorn_properties/template.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: MIT-0
3-
AWSTemplateFormatVersion: 2010-09-09
3+
AWSTemplateFormatVersion: "2010-09-09"
44
Transform:
55
- AWS::Serverless-2016-10-31
66
Description: >
@@ -12,6 +12,7 @@ Metadata:
1212
ignore_checks:
1313
- ES4000 # Rule disabled because the CatchAll Rule doesn't need a DLQ
1414
- ES6000 # Rule disabled because SQS DLQs don't need a RedrivePolicy
15+
- E0001 # Rule disabled because cfn-lint cannot parse SAM Policy templates without arguments (ComprehendBasicAccessPolicy, RekognitionDetectOnlyPolicy)
1516
- WS2001 # Rule disabled because check does not support !ToJsonString transform
1617
- ES1001 # Rule disabled because our Lambda functions don't need DestinationConfig.OnFailure
1718
- W3002 # Rule disabled as nested templates are being packaged
@@ -44,14 +45,15 @@ Conditions:
4445
Globals:
4546
Function:
4647
Runtime: python3.12
47-
MemorySize: 128
48-
Timeout: 15
48+
MemorySize: 512
49+
Timeout: 10
4950
Tracing: Active
5051
Architectures:
5152
- x86_64
5253
Environment:
5354
Variables:
5455
CONTRACT_STATUS_TABLE: !Ref ContractStatusTable
56+
EVENT_BUS: !Ref UnicornPropertiesEventBus
5557
SERVICE_NAMESPACE: "{{resolve:ssm:/uni-prop/UnicornPropertiesNamespace}}"
5658
POWERTOOLS_LOGGER_CASE: PascalCase
5759
POWERTOOLS_SERVICE_NAME: "{{resolve:ssm:/uni-prop/UnicornPropertiesNamespace}}"

unicorn_web/template.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: MIT-0
3-
AWSTemplateFormatVersion: 2010-09-09
3+
AWSTemplateFormatVersion: "2010-09-09"
44
Transform:
55
- AWS::Serverless-2016-10-31
66
Description: >
@@ -14,6 +14,7 @@ Metadata:
1414
- ES6000 # Rule disabled because SQS DLQs don't need a RedrivePolicy
1515
- WS2001 # Rule disabled because check does not support !ToJsonString transform
1616
- ES1001 # Rule disabled because our Lambda functions don't need DestinationConfig.OnFailure
17+
- W3002 # Rule disabled as nested templates are being packaged
1718
- W3002 # Rule disabled as nested templates are being packaged
1819
- E3030 # Rule disabled due to using cfn-lint-serverless rules v0.3
1920

@@ -46,8 +47,8 @@ Globals:
4647
OpenApiVersion: 3.0.1
4748
Function:
4849
Runtime: python3.12
49-
MemorySize: 128
50-
Timeout: 15
50+
MemorySize: 512
51+
Timeout: 10
5152
Tracing: Active
5253
Architectures:
5354
- x86_64
@@ -143,7 +144,7 @@ Resources:
143144
CodeUri: src/
144145
Handler: approvals_service.publication_approved_event_handler.lambda_handler
145146
Policies:
146-
- DynamoDBWritePolicy:
147+
- DynamoDBCrudPolicy:
147148
TableName: !Ref WebTable
148149
EventInvokeConfig:
149150
DestinationConfig:
@@ -183,10 +184,7 @@ Resources:
183184
- MetricsEnabled: true
184185
ResourcePath: /*
185186
HttpMethod: "*"
186-
LoggingLevel: !If
187-
- IsProd
188-
- ERROR
189-
- INFO
187+
LoggingLevel: !If [IsProd, ERROR, INFO]
190188
ThrottlingBurstLimit: 10
191189
ThrottlingRateLimit: 100
192190
AccessLogSetting:

0 commit comments

Comments
 (0)