Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(sfs): Dynamo permissions (#1251)

Evan Hutnikd3613f174668
diff --git a/infra/stacks/static-file-service/static-file-service.ts b/infra/stacks/static-file-service/static-file-service.ts
index 8ca15d12d0..39a5be30a5 100644
--- a/infra/stacks/static-file-service/static-file-service.ts
+++ b/infra/stacks/static-file-service/static-file-service.ts
@@ -215,6 +215,8 @@ export class StaticFileService extends pulumi.ComponentResource {
'dynamodb:DeleteItem',
'dynamodb:Query',
'dynamodb:Scan',
+ 'dynamodb:BatchGetItem',
+ 'dynamodb:BatchWriteItem',
],
Resource: [
metadataTable.arn,
diff --git a/rust/cloud-storage/static_file_service/src/service/dynamodb/client.rs b/rust/cloud-storage/static_file_service/src/service/dynamodb/client.rs
index a6a6b11991..babf4162e6 100644
--- a/rust/cloud-storage/static_file_service/src/service/dynamodb/client.rs
+++ b/rust/cloud-storage/static_file_service/src/service/dynamodb/client.rs
@@ -84,8 +84,7 @@ impl DynamodbClient {
self.table.clone(),
aws_sdk_dynamodb::types::KeysAndAttributes::builder()
.set_keys(Some(keys))
- .build()
- .context("failed to build KeysAndAttributes")?,
+ .build()?,
);
request_items
};
@@ -95,8 +94,7 @@ impl DynamodbClient {
.batch_get_item()
.set_request_items(Some(request_items))
.send()
- .await
- .context("failed to batch get items from metadata table")?;
+ .await?;
if let Some(responses) = response.responses()
&& let Some(items) = responses.get(&self.table)