Skip to content

Commit

Permalink
fix(costs): Make things a little bit cheaper (#112)
Browse files Browse the repository at this point in the history
* ephems provisioned concurr zero

* rightsize search function.  max memory observed was 120mb, so setting 256

* rightsize getAttachmentUrl... oculd go to 128 but being cautious

* 256 across the board

* little more provisioned concurrency adjustments

* correct syntax
  • Loading branch information
mdial89f authored Sep 1, 2023
1 parent e14bfd3 commit 5ec6ae1
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/services/api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,21 @@ custom:

params:
master:
provisionedConcurrency: 10
searchProvisionedConcurrency: 4
itemProvisionedConcurrency: 2
getAttachmentUrlProvisionedConcurrency: 2
val:
provisionedConcurrency: 10
searchProvisionedConcurrency: 4
itemProvisionedConcurrency: 2
getAttachmentUrlProvisionedConcurrency: 2
production:
provisionedConcurrency: 10
searchProvisionedConcurrency: 10
itemProvisionedConcurrency: 5
getAttachmentUrlProvisionedConcurrency: 5
default:
provisionedConcurrency: 1
searchProvisionedConcurrency: 1
itemProvisionedConcurrency: 1
getAttachmentUrlProvisionedConcurrency: 0

functions:
search:
Expand All @@ -84,7 +92,7 @@ functions:
- Ref: SecurityGroup
subnetIds: >-
${self:custom.vpc.privateSubnets}
provisionedConcurrency: ${param:provisionedConcurrency}
provisionedConcurrency: ${param:searchProvisionedConcurrency}
getAttachmentUrl:
handler: handlers/getAttachmentUrl.handler
maximumRetryAttempts: 0
Expand All @@ -103,7 +111,7 @@ functions:
- Ref: SecurityGroup
subnetIds: >-
${self:custom.vpc.privateSubnets}
provisionedConcurrency: ${param:provisionedConcurrency}
provisionedConcurrency: ${param:getAttachmentUrlProvisionedConcurrency}
item:
handler: handlers/item.handler
maximumRetryAttempts: 0
Expand All @@ -121,7 +129,7 @@ functions:
- Ref: SecurityGroup
subnetIds: >-
${self:custom.vpc.privateSubnets}
provisionedConcurrency: ${param:provisionedConcurrency}
provisionedConcurrency: ${param:itemProvisionedConcurrency}
resources:
Resources:
ApiGateway400ErrorCount:
Expand Down

0 comments on commit 5ec6ae1

Please sign in to comment.