storacha / w3infra

🏗️ Infra for the w3up UCAN protocol implementation
Other
17 stars 7 forks source link

feat(billing): reuse DynamoDB and SQS clients #399

Closed alanshaw closed 4 months ago

alanshaw commented 4 months ago

As per recommendations in Best Practices with Lambda this PR ports a small chunk of code from content claims that caches DynamoDB and SQS clients after they are created. This allows existing connections to be reused for non-cold start invocations and should lower lambda running time.

seed-deploy[bot] commented 4 months ago
View stack outputs - **pr399-w3infra-BillingDbStack** Name | Value -- | -- customerTableName | pr399-w3infra-customer spaceDiffTableName | pr399-w3infra-space-diff spaceSnapshotTableName | pr399-w3infra-space-snapshot usageTable | pr399-w3infra-usage - **pr399-w3infra-BillingStack** Name | Value -- | -- ApiEndpoint | https://h0yxeai5pb.execute-api.us-east-2.amazonaws.com billingCronHandlerURL | https://jdbo5f7aiyc2bunxeisr23kjba0hlsda.lambda-url.us-east-2.on.aws/ CustomDomain | https://pr399.billing.web3.storage - **pr399-w3infra-CarparkStack** Name | Value -- | -- BucketName | carpark-pr399-0 Region | us-east-2 - **pr399-w3infra-RoundaboutStack** Name | Value -- | -- ApiEndpoint | https://po75nd76ag.execute-api.us-east-2.amazonaws.com CustomDomain | https://pr399.roundabout.web3.storage - **pr399-w3infra-UcanInvocationStack** Name | Value -- | -- invocationBucketName | invocation-store-pr399-0 taskBucketName | task-store-pr399-0 workflowBucketName | workflow-store-pr399-0 - **pr399-w3infra-UploadApiStack** Name | Value -- | -- ApiEndpoint | https://6xm6krfbjf.execute-api.us-east-2.amazonaws.com CustomDomain | https://pr399.up.web3.storage - **pr399-w3infra-BusStack** - **pr399-w3infra-FilecoinStack** - **pr399-w3infra-IndexerStack** - **pr399-w3infra-ReplicatorStack** - **pr399-w3infra-UcanFirehoseStack** - **pr399-w3infra-UploadDbStack**