storacha-network / w3infra

🏗️ Infra for the w3up UCAN protocol implementation
Other
13 stars 5 forks source link

feat: reuse all AWS clients #401

Closed alanshaw closed 2 weeks ago

alanshaw commented 3 weeks ago

This is a fairly mechanical change to replace all calls to new SQSClient/DynamoDBClient/S3Client with a call to a function that creates and instance and caches it - similarly to https://github.com/storacha-network/w3infra/pull/399

It also moves mustGetEnv into the same shared lib folder - we have copied this function an insane amount of times, it was very wet, not DRY at all.

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

Going to merge before becomes stale. Please shout if any objections.