Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat: standardize aws_config usage (#1234)
Will Hutchinson6f73ce462a3a
diff --git a/.env-local.enc b/.env-local.encindex 593685c999..c8d52c5bfb 100644--- a/.env-local.enc+++ b/.env-local.enc@@ -6,20 +6,20 @@ AUTHENTICATION_SERVICE_INTERNAL_API_SECRET_KEY=ENC[AES256_GCM,data:N0REZtjrhg==,AUTHENTICATION_SERVICE_SECRET_KEY=ENC[AES256_GCM,data:ZBPg1kbiqA==,iv:yZg1sbhNgRe1Fn1KKGvxzd8g6Mr/B1ynhWHch8I/Aso=,tag:MyYyI0PWbXgb7aw8g0SPqA==,type:str]AUTHENTICATION_SERVICE_URL=ENC[AES256_GCM,data:qpsZroYxHbnq2cCOPi4wp2wFLCOp1w6+KXimFK5FvB28YaF0,iv:fMWzMMIVvwGGRZZwXG/l6E1qEHEDKGRcG3tGdpwtI8M=,tag:enw60jqQykLxZOMn20jZNA==,type:str]AWS_REGION=ENC[AES256_GCM,data:fooj7JPYfc0mXhY=,iv:acMeD1gmEZL2oppKdvDvghn5g4ohKdfTJ/MwchZVge4=,tag:KcUE5qjoRffBi3wNb4TKgw==,type:str]-BACKFILL_QUEUE=ENC[AES256_GCM,data:PHSU4Vb4ju1ChISxbHhaPQPyKLlY5W815mgSHxvBNQvJc8S2h0g73uR8VyQ5+S4w63wyXmXNLg==,iv:NbQ3ojhOt7xrvHuomt0kdv3hndwsBvTWSXCE19K5xXQ=,tag:CvuZhylcHOGZW2zZjgMG0g==,type:str]+BACKFILL_QUEUE=ENC[AES256_GCM,data:iugTbHD3Wa8SkWbhyAyrbJSPtqXs5v0KduBbA1Tt0ZE61cfIj9eRR2hKHbAumNy1MrbqnESv0Vw=,iv:wG7zqAcBHbCgDcuOD6I/QaN3s+GW1U4xsJHql5mWSS8=,tag:tKsXCX9Xvu5TAbqO3tGxyg==,type:str]BACKFILL_QUEUE_MAX_MESSAGES=ENC[AES256_GCM,data:xokz,iv:vmyuLop1V1PZgId9NXfeXil4fKtAGN4jBzpif6kTt4M=,tag:gVvQR6qcNrgYD2UpDFRrTg==,type:str]BACKFILL_QUEUE_WORKERS=ENC[AES256_GCM,data:CseyuA==,iv:IruolI0atrq59ZlGxZw+V2hYLAyaJ24XFckICcPpYgY=,tag:rBM9NZyUBjuPXA4og86bYg==,type:str]BASE_URL=ENC[AES256_GCM,data:sZntrRbLnzDpOa8oZgjSetKrEsi7Udc=,iv:MxtZFnRd/ywpiKHH0L1kCHlTXMHib5Cx6I/CR7kQGuA=,tag:qkZdYzfZLReItDhk62A4/Q==,type:str]BULK_UPLOAD_REQUESTS_TABLE=ENC[AES256_GCM,data:gh12Hw+BFNGCYjYIsLtuoHA=,iv:hMif0kkLUqmAp3CT4j5h/2Xjof+XpzoJwTfXOpt4XV0=,tag:aj2i8Oo9krhAMa60h4h8Ag==,type:str]-CHAT_DELETE_QUEUE=ENC[AES256_GCM,data:wBOk86uyiulhpTXRslc5E8D1o+H2ISSEtdS1Bb1ozy3qIv9D+Xx23X3RSCmg8i6GOc3b8e3HM+o2h8oNHEM=,iv:ZLUCU9R5MpOndX0/vHNhP969EvoWCcOAjvG5e1FGIY8=,tag:u8smUDFJakGKfMBbMBTP+A==,type:str]+CHAT_DELETE_QUEUE=ENC[AES256_GCM,data:vlQioFHMN0dfj0eg4V4spLxUPho78OXaZ5MKxcnNNCo9iB2MRkmtFzaBn+Rgo1plWLUuQTIkJdDaBF9A0SGR,iv:ADEe+O1E6+Yq4MIidxK+/c1YFUUebRl2SnZJR+I94So=,tag:LgvBA0vmShrztitYxmYdsQ==,type:str]COMMS_SERVICE_URL=ENC[AES256_GCM,data:euVhjvmCbsOLl2d7bQ/l9xkHMQakgS9eyUTP,iv:Z0rVWr3JGr+HmDkxj515FNF7RPq0sP8I7TTmQcmDjF8=,tag:G0y3MLslgqs61+aiOC4vCw==,type:str]CONNECTION_GATEWAY_TABLE=ENC[AES256_GCM,data:5n4O0+MKRfVntwn2MuiIyAnkVHACTNhMBJJ75kkXpnJx+lhPmfc=,iv:DpvHtrlot43pH2U0hWAYzIeV5GOqBtVjwi5zDUthq6o=,tag:dZLoGJR0h+h7ysa4KryN2g==,type:str]CONNECTION_GATEWAY_URL=ENC[AES256_GCM,data:QkZ+nSpKvOODA69xFOtYTZG/KOmEaPrp6H0yFYHD87I=,iv:fXVWlba/+ysDzlekuqhMpzdt2T1waxj+Pw+gVoYOL2c=,tag:ry7KTX2Ug2ceOqW4xUQVQw==,type:str]-CONTACTS_QUEUE=ENC[AES256_GCM,data:/sX+Q6gAj90IrrfMZZiaQuB4odJF4kQdLK5kvdKQWrx8WOdmzNsOZNTFZIRdVmzVwaz/,iv:Jk7wtdfCsLA7lRl/8rBCle0aDPW7LEKksA9FXD+R3WA=,tag:uNvOrYT96F3g1qvoKFPUgw==,type:str]-CONVERT_QUEUE=ENC[AES256_GCM,data:8wvG8kFGk6lzXWxVtjRMUakLM9EjMwYjfv8Pud6RKu1y1iCet4JZ/pFG+Kml0fPei6bLRE7PWRSVpw==,iv:GBZWOYIVITBpOo1L/Djekj/pBqMgy0Mi16NGieVkbCQ=,tag:11lT5txrdiHUUJ0sBN0w8g==,type:str]+CONTACTS_QUEUE=ENC[AES256_GCM,data:jlgyAHmZEefr3IM5ScHQ+ZUVZpiS5SUDEUyJ0HTgBzCMb5wdwsV8yVuwCl3bcinLvz3kMw==,iv:7ihT6c4a5OZopjTanbsPtPuVLeJ7OrKsLYnnn+4bA6k=,tag:rHyX+NvSODpB+ONGSR0k6w==,type:str]+CONVERT_QUEUE=ENC[AES256_GCM,data:S0Ew994kX+QaFTjGN88fzXMDkD73gacc3IpBabBdk2LlOzwdJVLCWNgoVgFupVQUdLVmD704hl0BCm0=,iv:2s4y9dSDdNi9i/hBeR9Ly21u/+JFfysm6L8ICk4Tr6I=,tag:1X+54L7h9tOQE6Hd7tBDvQ==,type:str]DATABASE_URL=ENC[AES256_GCM,data:Cfd3Vr2nFC6I3EFL+68H0DkV1FHD+3GeoMu1Br4Wmf63pEtcZQgx8BAWah2SIifD,iv:Q+QDmmCCwu6HTvrVTbV3+8Ecxx8bmreZg7i/EvbfHhA=,tag:LhPilS75fFhXXAbJu02hfg==,type:str]DOCUMENT_COGNITION_SERVICE_URL=ENC[AES256_GCM,data:4tdDvxY7+UJIvmGOvYALSZgUhPMtbINXenmJJ15hCMw2sgUEP3FN1w==,iv:q+j0dNpAA9aYRHW/BCNIRRPHV272m82wLHSmlRW29RE=,tag:Lsd1RLnMOiAIelGMaGSngg==,type:str]-DOCUMENT_DELETE_QUEUE=ENC[AES256_GCM,data:pNOlf66+ElXRq64fGj58E5OFANeJR+lGbvraqOK29NYXCtlxnfxYUstWNynDoFC9vMmcH2cjdlFce+LAS1kT20vu,iv:uezMHn5luyJUew8yN/qQEXZndfzuCG34SsBdSH7hvgA=,tag:YrwALwFIaky9vc3SUS4Xwg==,type:str]+DOCUMENT_DELETE_QUEUE=ENC[AES256_GCM,data:239Ar3mYClwFP5LrdrldqbdiORMxEXOQcHEPSFpf5VWJzN0VRtwXl/gfL3Uipn2XpXkWf8nhy/DENFS9xh0WPsgAwQ==,iv:nZbXkB7gWxSlO4r4zB/HDUGrxyzG39P+wDgarFKb5f8=,tag:6KVtABp7I439P8HXOyvbGQ==,type:str]DOCUMENT_LIMIT=ENC[AES256_GCM,data:mfWb3xax,iv:9ZLhrrinlMksZt7sXWOKi92unekcyxQbsGE2Ko7td7Q=,tag:7z6pIG701DvA5r9dRMdPTg==,type:str]DOCUMENT_PERMISSION_JWT_SECRET_KEY=ENC[AES256_GCM,data:ieVQpOsji1QvezkuWK/TAUO4ETw3+ERIg9Onv0cBK1hN6FAulAk=,iv:6zSdZwzOtkQOTB85N39EaHurzMyBT7gIRrOdYn3uKJo=,tag:wnSsZBWeMIH4N4CXRAcfbQ==,type:str]DOCUMENT_STORAGE_BUCKET=ENC[AES256_GCM,data:oxkEIIw2+39mTIRgkUkb/SI=,iv:AepybShzOyiozxTfKvlTdT9KkHFAumROCxMhGEdAvGw=,tag:cb35LhDbKqPOsbA8oFRNSg==,type:str]@@ -31,12 +31,9 @@ DOCUMENT_STORAGE_SERVICE_PRESIGNED_URL_BROWSER_CACHE_EXPIRY_SECONDS=ENC[AES256_GDOCUMENT_STORAGE_SERVICE_PRESIGNED_URL_EXPIRY_SECONDS=ENC[AES256_GCM,data:4iY4C3A=,iv:8CrwWsHNzk4md9iX16UVv1QMsliYw1GWayHVT1W06yA=,tag:0j5CfGnQ7ACTUbMp/bQ9UA==,type:str]DOCUMENT_STORAGE_SERVICE_REDIS_URI=ENC[AES256_GCM,data:8tfkm9c0x8uc8IojNFN8BM41TIc=,iv:rwgAM7dHlNkuvb8CshSHUfIoS0bZhBwZa+g/bdId0rU=,tag:F9YMRCQWAuDGS63WMQRXTg==,type:str]DOCUMENT_STORAGE_SERVICE_URL=ENC[AES256_GCM,data:Zn9K1FHrnXx5uaIBHzS/OCs3rrBhts/Ah7QelVAATwaI8RDiNZc=,iv:U/dku332ORQ4PeDOk84DC7ZO5b6m01NPgWg1IyqNBz8=,tag:O2m1KlE1lwJcdsEFHGQYfg==,type:str]-DOCUMENT_TEXT_EXTRACTOR_QUEUE=ENC[AES256_GCM,data:ryJHXTTK9ARqgcNzKeaVXAoflv8hdyJ5myDt7OgGt6GeUymFAtmNvEXzywJEFzw2ylK9JuGlNaZXI38Y+PFdpLeF,iv:Pce6tgXPz4xr0zpOaOG4JQhcq7GYVRf6UcnJ69v3mSU=,tag:8BMkLxmifxk0xwQE/skfVA==,type:str]+DOCUMENT_TEXT_EXTRACTOR_QUEUE=ENC[AES256_GCM,data:vS232/e0n+runDVihPma2wwXt2LM4yk259q24plqZgeKydRD+cxeogU5Nlr60JbBvYznb1pJ17uEjd4FkIieM1OguQ==,iv:f/OdCMDlwpOoYGVfdk+xm6RTvO/lN6+vUi/n+2Mil7c=,tag:6RgtpItUZkp7CfAE5GfQFQ==,type:str]DOCX_DOCUMENT_UPLOAD_BUCKET=ENC[AES256_GCM,data:wkOsboyl2W3ZHlr9F68P5kI=,iv:q7arpaFEe+4CoR+ElBBc6fT6wQJchLI4cwfCLnzZWvw=,tag:BukvHQRgrO7uZuI20q/hkA==,type:str]-DOPPLER_CONFIG=ENC[AES256_GCM,data:MzqQvJ/T2FZu+wS/WFI=,iv:w7L1jhFOlgekyke6rLlldaFr7OD8+1y4Ctzj18XjJas=,tag:hWBo+yqcprbsE8AusRffYA==,type:str]-DOPPLER_ENVIRONMENT=ENC[AES256_GCM,data:F6JPHl0=,iv:+/FRtcSyc7Z1vs0+UVk/JSryt4afxLYCL56AQlnDbxk=,tag:mFOpbgRLaSGGLvIhu6J6KQ==,type:str]-DOPPLER_PROJECT=ENC[AES256_GCM,data:d/kMNs6lJmxuiJtHgDTPWQ==,iv:b7L7VP1rI6aTFPKOvCQ3jM9IaR+ui0FJ1tjy2JUbDBs=,tag:zxYqgLJnJihpo7TVaLKPYQ==,type:str]-EMAIL_SCHEDULED_QUEUE=ENC[AES256_GCM,data:N3WUuLReZJBAIeJ80uzRfqpYFxPQ0tT49Uu3NUtoWEOJiDr3Xf6WbRqk8tkaaK8Rf1CyONfpI3w+ahtc0cp45A81,iv:pVYd2kX6YXJk5yVmXnXeTSQvJiWwb1TLKdmHsgHifWU=,tag:A5vcuulPwfeCL3omGP0otw==,type:str]+EMAIL_SCHEDULED_QUEUE=ENC[AES256_GCM,data:N/tC85Hcs3ou6zdyLHE6EgjH8NctMbVYx3UYRRptOxOpliYHeENZ2W3zsb/9axnjiXkrvs5Qy/Od7JZHnHvvEykR+w==,iv:5tlgE6smmQKSRK4MSWgJ9PePv5f4z2AryKWTm3dxA4k=,tag:5iD4mT2W4xB2BWORh9v6NA==,type:str]EMAIL_SERVICE_CLOUDFRONT_DISTRIBUTION_URL=ENC[AES256_GCM,data:2ZAaVS2but0h+X4/EEeUrc8Z5veZp4Pk/2qO4gZTWj3Vn3mb1yac,iv:J3UU93t9NohsqSB/hYF40BMWUvZh5i56lNAS3zT0Mt0=,tag:i4geul0Fd2/6i148U/+p3w==,type:str]EMAIL_SERVICE_CLOUDFRONT_SIGNER_PRIVATE_KEY=ENC[AES256_GCM,data:ZOE3uYwGUTjQw8d7a64XXOFLkSN69ow/xJ+GyedwUVBFwKQ=,iv:TD0Zze7/vNWBHyMatPZgUBlDmChkivO4NtfcXtN3JqY=,tag:r3c0I26G0w1IFhSoZSFmBQ==,type:str]EMAIL_SERVICE_CLOUDFRONT_SIGNER_PUBLIC_KEY_ID=ENC[AES256_GCM,data:S5Tf4VdyFjQADYyg5fsiVA==,iv:hLhTgGA8QD4dYMfx46EWG2LWczkxzb/ZkYaNoDnNv9c=,tag:LRWxtlHrXdhawxWOtIQ3xA==,type:str]@@ -57,8 +54,8 @@ FUSIONAUTH_OAUTH_REDIRECT_URI=ENC[AES256_GCM,data:UVs3QsOEQxYw93hE85FBM0sddqQEcAGITHUB_PACKAGES_TOKEN=ENC[AES256_GCM,data:yRIbqk7bCsIT1GrJqdE6Wq6oIDQ0hjiVnFPvBsAe/gACNWSD6G8tliyh,iv:Ezpb2jLqupw0UfoGDVfZJKsobIMo2L/wPXAHtvaUu3k=,tag:rom/qeqagoaqDxpYfijXeQ==,type:str]GCP_SERVICE_ACCOUNT=ENC[AES256_GCM,data:tKfFrnoa91WSU0pKzK8MkOFMuoR0mnvG39T7tPAsKmtZcDJjjpoMgch3jyyEP9uL1rm3NHXs9ohMAWrHzQDQPG8zI2s5UUN8cWmRTTXOEYHn6bFXwfLcdA6T6iHmu0uDINZbdXtX/8+Yebos+e2J5xiidTBu5MbtwdKbD7q3pkkdMFGmI/nl7jS29I5GiLpg/nZ0Qw1sAjRUwFmY9cN4jQxZgUiSkvP50SCN8pATopiCsXEhRUd4Al9eoVtVoqJl7XJDJKAFzakM48rhl3LjKnZ2dJ9BlYUNkA70ZK4p+3PTuyh9rM1qttEaes3zzDQi2GH+hAAzbMUOw6TjHLpk7uLRMyK8tbkma62O8u6YhTRwUoaYfcIW16+wOYL7CDsG/n+590APGSL6iNSCVqoH0XUsyKLQ0FWA8/COpyu4uPBp7xn1CfrndhOgmavWrKDIhEWWf+aXk9NhYRcoWYDSYM1sxq9iV8Ao/MgRTxMddmRNjzX8wpKW6Qa+DoM9pTdLdfcYp3A5ZVHpqsrSVPgADopi+Z3rrPlkpCfaBmDjU7VJyKopfZsbuNKUwSEBzMtp5APxn8BDWdTn1E902c9MJ7usS4ruRd3E5MQRCeqTrOnr/BgK49C7U8aXDWzgbQcijC4vcERwGrOXobe2YzzfUlPPSlKZQlJtz3FLiytw3JBIn2CpiOv9vwPIXArH6DIpALCtu8DDAA4SeLSH5FLNuP8l+ew+aChIEPLLPF50F7wwHcT32gs/AjWwf7AKcoVSkCGZFp0YzPGWst2+tr9K9L1ORnmngDRXOmZsjnmCzRPzoSALAs4qkNEWXHwKF9dqFhnMbxvm5rawxFVv1cnaMJxLvnPUy8LsssKlEa22Pe5zk5oIZ/5zTNx4/l9lszfOdjXiowFeb6Yia7iPYOcV+qQQ50J45cmxX4lsmyOw+/aHWWcnfeINfK/GxhZBwEFQyYoDHua3uZwFQjyX3OczZ8B4rb4sDksHJS/Ez4DlW6LThJM8WqMCPDicyLCwbswmzoPYC9tJC3yZOqNoToA4Fxx4q93hMk6tln3lHEvOzCli0yKkgfTXVObeFVPb35jfuMoYcyQ2jzWx1TMXctoPBTlKdEGYCj8hAH1Gc9tmstR/HHxeuML8Z5Eh6ZNo4d9iBFvMweJ7u6KdtM+x/LDMs7NnagnN0UbYjOdgl+y774AQHtUIpPk8/ZQc6NN6N0JgYhsc4nDPhtEo1KxZWWDLVdCWMPfiwrMOoLgt1Bw1mE3TJDokroqwBEOP4hxMwOKffvmePWvr70sJEoDHKzVxtcpPL+1j2lKDoDeNpzXpSDtOOJtI4xr4Z5qpWDNPHsd89T9oYLhdJAma3+9gxPpl65oPbMLZqcYaq2zUksU8hLyh6ypKWp4azDhzA1hRujNQ7ms+iVvMyN0t9Zio+VhfPYvWtr0AJPCtLQMzQz++hk6021WYMJCyOEIekQ/Qp3od4zundec4mJWlU6jjsI6892/fyn0Qn2Zto8m7u6+HzX/O6xB/V7e8WZeSpJsqNzvBvbsk7aQrypuiqNVeGIHqgt4qiS4PFhlX/NjkuVbJ2yY9dqw1hCCkeAWL4nX6aKflrAsVkjctCF0oti9Ci5jt4dg5v+34ag0ez/8q4q87u+xv5xa7/nxXxWHhNtQBhWH6354Aja14oLHKFyhLcE62NgDKcwrMULrN34siIH+fol85fpwo/pEhZEQdVaGWJJFOSZW4jad5m8wVNVDd7uvCIGmUtxM/6PrpXrMABIzsqx92wvxcSmMrQzYXQETK4frTVc3kAZFEvAjNWGbhmH1Ij8G3T//uW2siTL/PhPdQOcbqJKvLS0vsIDBglLbhvXu+usp5okJ2R52svOUBL+TyCopRvC1F/cDieV27AjAM7i7c+oQxGTE1OpJhSh/RMR0bNuBk+lTJeCX1KTrONCy6S7C/azArPfxm43Uhy+VLTBdXi4JZSqqhinWNJ8y0zNEYyppgqx8zFTJWFEPKDJALUHlV6oexUtNEz0YGQcxEZ65VdcunpZLnKMHNWzIE03YkJfraJl+M1yT6JCSWkh6gKe0zX8EQFpz/QgHWjLmf/A8Li72+TeH0MeQlP+IiXq3VHoaRAN8hpKgvqBqKKp4WMnWkP8zcyOCV1v/P3fDvcvj/EKKju1MI6I3ZZI2cPGwoaltVHJ0ji5U1euqkRwShIKewNkpK85VTvk1b9GK1N10NcKjSCgDuoRE7/FPk6Luna+XIx33GvTDn72loD0/Q/IebWWS0kho9ElZ1iTslE0IQpPaLCiX/5hD9Om8qOsXg0UzCCE+qdyOaExg6IGS0PiVuzWIL5/AgzNuEWTBYQ9HQyaBBaLiqoJpDuv2znbk1eRPUrWoO5ue13UEr+kBbUSzMYcY3z8krwIdyvZRn2OuP5WCywbYlfFJfegOx3K8KyYaT2XzinmNWFwVK8rEKBuCMWRs17bmBl9CqkiInbpxAuIC6AP6d8DjVs5x+lweajg1mwP4TAwelGNN4sdwQI503KXqSF6WBHGpbLJbP76PlZT0sfZ0/if3Ue00jzC9suQDVpUXvYJzo2lqDBmsqS+b4v/vo2pJcbR8mEkOsMV3S4sfQDqQFfKRx4vAJ91VWOlVceGBwv3nalVi0Yg9KubiudPy/qUhsyvlMmtOZDjBHf23sW5tL30EmAF3B8P0KxARWySjKB4JgCE8Vt+YS8JFfuhjlvHf7+pdQMDFvxsvLORhJ5c7q7NJtSHlcZWB5+at4BFqnW1nUFPpoyata1n+dABKlfxJbF7eFCsTzl5Y8d9xgUyrpv0k8clxvNO8nTxRROw4jjRV8mU5wabuzrNVAhPRDFz20rSRJ7JA6aMvAxMQcn/3kwKd2jUcT60AT0xDf2lXBAl0kuNMS0tPmA2kww3Grj+zDx2ZUgnoTmgXWD2qIYQldPU+6PMutyEnyAxq0WTz1T3gfFbmiPsJ9+RU2gWqw+EvefR/KtldIYOdcwEv00wvMoZkSxj5Ov4QyNdbBnXYJR06mtJs6d38KskocdyO+9HR4Oai2wWunDm3jmXcB5kwXwpF0Q4H+2UO2+8siqMIU5neWbrQC6ocdUUEmr2kW89UcEMsU9xsR73VvnYbpFRPmA8RgT6FB0FyfBC57f86Plbgj,iv:ti7HCXo/jbTZBeIxQXayz5QWWk+Y6rOmd4OM4qUabSg=,tag:zMy0u8CIEiLwWobMYBWPlg==,type:str]GMAIL_GCP_QUEUE=ENC[AES256_GCM,data:v/0FjYqdXOrjf2+5X0/gSeSS00LYHF30Aw1EEqvKEvl7vpeH1rZx4lyxQl5YTZm84xCXd/RH3FSe,iv:cU/luekGinClxc/Lol0J2DEtxnwgCjl7kNgroWELRbM=,tag:sfo7mruHeufj+JcPUTX1KQ==,type:str]-GMAIL_INBOX_SYNC_QUEUE=ENC[AES256_GCM,data:K0ws3kKzEF2oiwYdbyGlufEDrOEeK1Rs3wbNnUsTHdFVPawL28ThPZMix7LqD6apIVKV97LRNp0XoiDcObIu4+7Auw==,iv:MrAMEOv05Hc6bJsa9zetTzU76bzzKE6jkTE0FzyoUlc=,tag:60PJY4bVUTpkQK3AEHlPFw==,type:str]-GMAIL_INBOX_SYNC_RETRY_QUEUE=ENC[AES256_GCM,data:AlTZhYE3R9kg/eK4IlrKCURUImdJwHn8qH/kUYqn3qnws8/pGNN6j8otWiyO6vNEQW+IHyNGAXMA4FJrJedEFXBTEV0=,iv:JyrHCLvPvxRhl/la5c5wZGU86oAyf9zl56T5tgrOQOw=,tag:rum0WgoX8eo+mOBdx20MIw==,type:str]+GMAIL_INBOX_SYNC_QUEUE=ENC[AES256_GCM,data:Yp6ni5dM8v+1zBYLzhYVlQcZNje4YKP0y+SH2Xsx4JE26MQJReK6yqst6GQZfSYw85uS1k/7FfsqLIwftcugKr8RiiI=,iv:Z2azrAvPW98Al/zMZV+yRl8YXQuS61L2F2TnPeBPC88=,tag:aw+V9H+aNaikwg7AC3yHKQ==,type:str]+GMAIL_INBOX_SYNC_RETRY_QUEUE=ENC[AES256_GCM,data:32iHsa/wFaY+T+yPr8olR/30leRv6fVUW23jWEwvT3S9lksfIpSWhzWAKo8qCHimMydhoozvFr+fujeEGZV1AoA3aCLk,iv:0VUj1xI6HhkCoNXxweQ3ajKTY02wKmZCBhRFoKCVY20=,tag:CzMVdQrmALodfVg/LfV3/A==,type:str]GOOGLE_CLIENT_ID=ENC[AES256_GCM,data:+zi8VAxv2AMVzXLrMtmi2+3FqP9e7v3lkFBkglNnmkqdaSXgreUoyKHphX5p/G1DMyDdY6xMO0kw9B5vKyPxjBHRjx6TLUnvLDI=,iv:wENosBbBcqziLOSsfYA7NUfWYmQFhn8vnty5itMQCYE=,tag:KLvQmrsCzV2iQArbQkbZyQ==,type:str]GOOGLE_CLIENT_SECRET_KEY=ENC[AES256_GCM,data:XCoIFAZJ8l1FFA39VWHOx5VLb2JDFCf7Xlw=,iv:o8/GNOpHxncGMUhMm6XSXGbXiBJwdPNZbJsXRX5wpqE=,tag:8CHT+58PmHJTT8aot0wsBQ==,type:str]INTERNAL_API_SECRET_KEY=ENC[AES256_GCM,data:NE+bcGMzlA==,iv:ClBLMBwvFe7AYmvjdyyxPzs9tF3Nes84MwWSnCILPEw=,tag:0VUYFTMgb7tVttUcNLxfMw==,type:str]@@ -66,7 +63,7 @@ INVITE_EMAIL=ENC[AES256_GCM,data:BO4atZt/mLZnwXMWpHtrDO+zGbzfQXc6,iv:s58xdISCwO9ISSUER=ENC[AES256_GCM,data:JkOpdR7IUTV2EovkCJ8s7Rgt1QG/usMysQc=,iv:WMTpdwTR+XWPWA4PF+2qvNb0hTywKjITmnP0oUY7598=,tag:BPofpiSjMH3EE45UWTyURA==,type:str]JWT_SECRET_KEY=ENC[AES256_GCM,data:tbLpetXk2qNmkfKuXIRsHGKXfAqV85lGG6TNrV4wZjdkLshOqKr1b2dqvHZQzA==,iv:sf1oPe5qOtq8NFsRXH2pLb8UIvBu5EzcGf7QZlQOcUo=,tag:rXwmo+I00/6r2JMUCH1HJA==,type:str]LEXICAL_SERVICE_URL=ENC[AES256_GCM,data:4/tpjzJpMpqCLsZ+mnlcse7bpnZMV5Wfoa6RWIo=,iv:WFHL6Xxo5S9LfmK/qS1/CWBv5Ruijhyla28geIr/5Zs=,tag:h2We33RYmso5I4iBtNewkA==,type:str]-LINK_MANAGER_QUEUE=ENC[AES256_GCM,data:QdmlCRCofeJx1rnpu21rKonJrvxDBw46360ZCvPzytUtNcIzv61kANkQ0S1wo1FzgH4vKRO4KeLuOGWu0CrF6A==,iv:AulD5x+uTKkTTH0cSYripTYDJfMQNiLqbKWKzoGsbNo=,tag:DHRABQd/nk4rbDJryMHMNA==,type:str]+LINK_MANAGER_QUEUE=ENC[AES256_GCM,data:QVBfWF+3wr916/y3qu+U0wT8TMY3kbZyzVEwgxgyoIIBeYQAUo0QxJuMKyO3tu4uzbWK5shgux2cKakSyt3ncLM=,iv:SxJ8KX2EI0ynYdx5WMa+wMn2cKTZNsjfHTGViRtA8hU=,tag:cHv0qEDVOzP10MfYqjqxtg==,type:str]LOK_PATH=ENC[AES256_GCM,data:0Dwla3r7J6FaVAW0j3f/lRQ76lldgFnAz1Q=,iv:2oP0UnxCxlLKnrBER0SAzRlm8m6Nc0JnI+Vx6WQfml0=,tag:4X6b3IwEG42fbErDui3F5g==,type:str]MACRODB_URL=ENC[AES256_GCM,data:3wme0xMQ4Js4TXlThgFpKPtmEulV5XBJWk+sR9apnzR1sgvPF6sE5BGsRM9YqM8N,iv:Dcir0iJE0EItof410fuRMklazAearuY975ZY9Owde/U=,tag:gAdHj8pr58r3HpQb5hCWng==,type:str]MACRO_API_TOKEN_EXPIRY_SECONDS=ENC[AES256_GCM,data:Y5aj+37v,iv:orpYGLiSoSj/81YAyUeGMrywSm7kllDYxrmU85mssKE=,tag:GaGtftHhNLiKa/VLiQjOcg==,type:str]@@ -75,7 +72,7 @@ MACRO_API_TOKEN_PRIVATE_SECRET_KEY=ENC[AES256_GCM,data:Ri/K4Lm0jY0ai5Er4a6wfm3V/MACRO_API_TOKEN_PUBLIC_KEY=ENC[AES256_GCM,data:ekYImNJDA+IFmuVrFynAmIgCYjW1Q2AYAbJPBexSouXmfObvlft17xt/j6/iYaumsjADZVUt/KXkF8qS7KtjAKvezKTddhhOCcNQFTJzGEtabMPKXsoPJ0GyPsNrzrY3OX2fwW3OMZeyM0Y9I5khyskyQFWRY2ZdWi/MGl25ZL7jp3HV7xshZMVkuO6Hviy9KFTZy3xJkLO46YjAd5i00YTyMBlkW81unbpv9NxXWIftsoNKoSogXwkJkaqTt+NQ5U6DXpLJiVWXFE7jh2Tt5e5g2RIg+/FYvcF4ou7KIcXxlLLdTSxtVWH5BE8rgMm68UxK71JH4BLAe10JLlEXimyVYvP4DVCj3QdJCDxTtPVf+VlH6NIIMURRjtkqL55pFk60H5rzxnLti00cKmUwruPSbhSnFZq+p/YVHOnQs/KiWz49Yy7YooSIIautatBWG/uB8n79CSmxrfeGjw9jHARl8L1vCldLATCY8uBjgbEd1gtUi7rJZYmTlh8MOEHNCLaMT9LblSSJuMu3D/blCiat+nbiJeoEByQnqukcQ+Vnn6FdBNReD0iTbMepSvlp5uu4LUKLJaUCX4LMdhXWcQZVloQ=,iv:RZm0FQ4SZ9urQfqe3M3dRleAfd/HLhgag9Wk7YLoKxg=,tag:ujP4jTV/7Kr0vm1m0Lv5oQ==,type:str]MACRO_DB_URL=ENC[AES256_GCM,data:kUw4zhdbtoXbMM8kHZXHtSiynFqQ16bgQvGTM+bO1pNmvItdw3C5agzWyLYLa9qT,iv:hY+MRbTJy1+/eVRxF+HWNeCU2IorGjNO96m34omsbEY=,tag:FEyUlpHdA/kZVttU2kNBvQ==,type:str]NOTIFICATIONS_ENABLED=ENC[AES256_GCM,data:X+rb/I+D,iv:tVh3J5ytVackf1AAcjv3tnOYY9W+fepbd1LtOpGVyzI=,tag:0RxK2Bq3VfV+r5E4YOOBIQ==,type:str]-NOTIFICATION_QUEUE=ENC[AES256_GCM,data:6tfDTGDE4a/NWYIYwHmBROjT0GHKyJiffS4z2I/M5XiSs8HDClOoOVmqFgp1IW1tamt7ONmXBQ==,iv:81Vsuh3v++jL9NkfmDzr+cckEmH73GqlReyHtUrVCMs=,tag:Sn6PoICjyRgTgkZ3se53xw==,type:str]+NOTIFICATION_QUEUE=ENC[AES256_GCM,data:TZ3iebiICJvzNKg6ZIWBE+N4ZHK0LwaxmmHxCgdSGvMQgOfFE5A06VqV2HRCOY/Bs6tjo1a4uc8=,iv:dVU5IZIjDH48VItxsDn0hRL5UwE+Aq4gYMlXrfGnA6M=,tag:g89w67wsTBCchwXMy5Jivg==,type:str]NOTIFICATION_SERVICE_URL=ENC[AES256_GCM,data:69a9N5iQAQAw9o3wEu8rDpS1JYkeS+Sm9keQX2Rfbl6AvA==,iv:pe99zxWNfcjlsYk+d8hzeD/k9hp6vw5NGLuL0sioGes=,tag:rhOgE1iVhyr7SI+J7QJrqQ==,type:str]OPENAI_API_KEY=ENC[AES256_GCM,data:AbDdf9CeGJl+K2QPwPY7sAR7SZzl5NAebGolscz8Y8wZtFRmzNJR6rJPP2Y+p2S7d+OaZDo=,iv:z/JjNQK3gfI7BQerSAvEf67jp9p94f09XyWeDbqBgPY=,tag:5Q2dIqoWE7G7/alDllf0pA==,type:str]OPENSEARCH_PASSWORD=ENC[AES256_GCM,data:Bu4SFjq+TcRJ58UBdwFoYF817seB9/IhTz7JMJYO3ImCXj2+3yVgSB+1fp4Yw+SD3Q==,iv:dBascJfzv87tDzXDo8/+nDgZDqpiejLhaoPe57XSR6U=,tag:PuE6aGDDUKZ8u7oJOFJu0g==,type:str]@@ -85,14 +82,14 @@ OPEN_ROUTER_API_KEY=ENC[AES256_GCM,data:tm0pdUOBZ2lMX7V4VMl38FvMhSex/KTBobqbs8S2PERPLEXITY_API_KEY=ENC[AES256_GCM,data:XPoTLwTGKxZzhvk+/oS9uaCElGyUCVMVFCzC3bI6sfHjPqcj/XwMmhe6VaPiosM2HsEuvwODag==,iv:SHX1IVDzwpSIepmd36pi5s1e3jvlwKPMhLbUQsi1764=,tag:441lR8THlH++CmXlzl4qag==,type:str]PORT=ENC[AES256_GCM,data:GjmPIbCb,iv:8dtNbwJbwqNbKPGyNhzzb/JUtL2ojQ9IE0/DFB6E69o=,tag:QM7S/G82PoaSIQ9tG9ibbA==,type:str]PROPERTIES_SERVICE_URL=ENC[AES256_GCM,data:ZdhBKumeBYaQtS5LA66avLLvIpeS10a40NVXzeFOkYc=,iv:jgQqevm4vuNGuQz4vC0ljKXOEz9xbAXr8CqTZJSv51o=,tag:rljw7uf3Q4dwHr024MSjhw==,type:str]-PUSH_NOTIFICATION_EVENT_HANDLER_QUEUE=ENC[AES256_GCM,data:57ibjfj9zADHcju91MFfP2xpr2YHUqQaeJxOpkrl2U1cXxElZwl+2TELnrPhOBYse4PvF81czKE=,iv:GW0DDY1Chqnrd4yfM1beOqVO2HSwsZZTFtxOMv8UQhs=,tag:qQoMIfC8Svgd5EP+tTI60Q==,type:str]+PUSH_NOTIFICATION_EVENT_HANDLER_QUEUE=ENC[AES256_GCM,data:zMdzzMwFk79Uh0CnV7b5sCpF31A+3jdZusQqqHXVdw1gXP7k/ZA+axHkYNiPHiXDZmyhqbtT4msi,iv:Tsp8XCvt7frKqgSoafMBtJLZa+gqm4Q9BuoudAEiGU8=,tag:ma3cPz2LsRWxmhZMUMfYcg==,type:str]REDIS_HOST=ENC[AES256_GCM,data:KAUKfz+qX4MTxI/5IYkuVXtJPnk=,iv:ooHphvY+hSni5SIW8RzSSeJovwANsHlLsUxGnMiavs8=,tag:PpOnyd9IJIb7riz3YiNEQg==,type:str]REDIS_RATE_LIMIT_REQS=ENC[AES256_GCM,data:MUBVlWPaow==,iv:HhaHygBal8zAvUA+Try/ncw/JeOC1Zp4hBnNoblpAe0=,tag:myLK79Qr8XCeXEe5d05M3A==,type:str]REDIS_RATE_LIMIT_REQS_BACKFILL=ENC[AES256_GCM,data:MfiXtTKI3g==,iv:uJ1pMCQLYnxUcbfoXzA2A4TsAZlkOgBUWKWwiz+TmzI=,tag:43WlicwKaj1S1wSJjQKouA==,type:str]REDIS_RATE_LIMIT_WINDOW_SECS=ENC[AES256_GCM,data:WWqI8g==,iv:lwChx3CGfUMRAbsUm4WMBIBVf/d3d9UL8zey4gru6ok=,tag:mVFVWjBJs8qRGK4/uvH0pg==,type:str]REDIS_URI=ENC[AES256_GCM,data:oK1HOgJtXLRnWXWSWrGQPYa+kEc=,iv:I4bV4B2f5S7fz6tI2W8moi/Qn8aimCGzWxgygMG5EA8=,tag:Ao1dyA1XP0yAxT9ISD/8Kg==,type:str]RUST_LOG=ENC[AES256_GCM,data:KRfuVq++CA==,iv:0CJXgvi7rL6gYeacn1Adq5bSqvrKd0zAwB0ehpL+s1A=,tag:2l+cwJwuV9ShO9IefgwBzw==,type:str]-SEARCH_EVENT_QUEUE=ENC[AES256_GCM,data:dMK71YJsL66NdCfx8jpUAVX9cuEua7lTcYznIgBAHYZhON1ZGO5VoKP4jRPHJR+fs+vGytNdWA==,iv:GPhon/aSMlX3YNCMgOnRKUXh6AkpN2CvOrfDY5A0Dd0=,tag:qz5x7G/+b+lZ2w/ps6jbNg==,type:str]+SEARCH_EVENT_QUEUE=ENC[AES256_GCM,data:14Uxh+fnMywx1lJx/QhsivJQOEycx5dQWvDkQQTV+1Z9SGYz04UX7Q6FSoEU4UPWWfssVw/psyg=,iv:c63ebD8cVJM+JMX7tCNZWcJVG6vaKpO31lqdXwo/yH0=,tag:QbqmREWGSUwrtAteKKqk8Q==,type:str]SEARCH_PROCESSING_SERVICE_QUEUE_MAX_MESSAGES=ENC[AES256_GCM,data:mNMRqw==,iv:Gt4WYsNj0RZUFsqQ7+iMiIAmyrhZPaet+PC2es4yJrA=,tag:XbnTbzQX3TjzhmKtl0E0WQ==,type:str]SEARCH_PROCESSING_SERVICE_QUEUE_WAIT_TIME_SECONDS=ENC[AES256_GCM,data:Og2Kzg==,iv:HN8ZO6xhlgNJKK0EVLVWKv1EAshs/bnbzJoKGf/T4QM=,tag:MYYyJdV4CqZTnatL1h5WDQ==,type:str]SEARCH_PROCESSING_SERVICE_WORKER_COUNT=ENC[AES256_GCM,data:+KmA,iv:0mylFrVTsQEaeDxh01OPZgXy+iS4xDHFrxKUuMETywA=,tag:6/QvSzZD4FAWXhiY/0vN+A==,type:str]@@ -100,8 +97,8 @@ SEARCH_SERVICE_URL=ENC[AES256_GCM,data:oGqaTpW65FAPPgNSDxJ2OAR2Tv40AbbUScc8wA==,SENDER_BASE_ADDRESS=ENC[AES256_GCM,data:9HYfhHcf8r3TUEV0HxRryZcpxgSBS/zI,iv:8BAo10SWekUcrf7BBbb39jNw2ggCmdKEd4BI1G8rEwk=,tag:Ch/gdkER5ASSchFQm5kjWQ==,type:str]SENT_UNDO_DELAY_SECS=ENC[AES256_GCM,data:yxkpXQ==,iv:J+/pCIcvTkeOHU8exTAXNsHq14c0CUzsR7Sj4GW12EI=,tag:PbvYUtNBtnW5poJWw3bPnA==,type:str]SERVICE_INTERNAL_AUTH_KEY=ENC[AES256_GCM,data:EqDa5wu90Q==,iv:6rF24wsimL4TIpbYTpzJ06s/YKcyCs3GXRfZM4dViKQ=,tag:dGwEOKttfPLOigpI7f5WBw==,type:str]-SFS_DELETE_QUEUE=ENC[AES256_GCM,data:IZgwgFvUIWOn/Ivw/7iN1mOKaL6i+FI57QmWYPcargLPAbcGGyhtjc7d5IWaElJur4oiqlhB9cfUCCk=,iv:9c0kEzj4LtKw3qQ37SyX7NMk3UbGpnGUpcf5lo6fdiw=,tag:nH5fyi9Xi/vZEC7HYoLJSg==,type:str]-SFS_UPLOADER_QUEUE=ENC[AES256_GCM,data:gOo3RTPnKyJF+MdVpcT1UkBAXUG8ptX2ll9EHLOHZAqMibVVNrCHaA/Z2W5B62z3udDDVSny2nBzgkcDWe82coYMFw==,iv:O6Br5piYsIRoEuXytiqsECvkD6kyAQhrbODph3/gvYY=,tag:JBnFq/809MhKvaVn4WMdWQ==,type:str]+SFS_DELETE_QUEUE=ENC[AES256_GCM,data:P2M7QTdNPBPIirZ3k+Ra6G/YXmWqHaghgzl9dPy0Aglr0TjT5leOYYvlv7uf79F3LXOZf8qc2RyN0EoL,iv:+QE5UEenA4Y0Czcggi+PU1y2VvmsvB2BXZ9umBZhBW0=,tag:bwvtfvKk6ljjhQtJOTAKGQ==,type:str]+SFS_UPLOADER_QUEUE=ENC[AES256_GCM,data:US7ukrRj09d69Yi3X7NAeXWo9RAtosZNyoTFepkKo5KBTPWob7dlI2hgOQGw8PZD1KxXrQfVPr54lZrQ1XEzaAniIhM=,iv:9cx/mrdSEVK8OP/C77XuIhWT7Lr45atwad5DVN5sUHo=,tag:DByj18IAueswFhhob65ZkA==,type:str]SFS_UPLOADER_WORKERS=ENC[AES256_GCM,data:vcVv,iv:yqvr+Ot+tS2WL0PVL56cqlWujjtgo9YJa7N4XnrXjtI=,tag:XRdczZD/yHF6KB1MT4tMKw==,type:str]SNS_APNS_PLATFORM_ARN=ENC[AES256_GCM,data:YqQPrXblFz89HQO0bYGc3cqafW+YTvL0XWz0ZJCfHupwqLhETkYM8uSs0XULqLG451zMptR5Pbx9L+augE5gWv7nWAcitDnRoODNj9m+Yf65Egb4,iv:HQ6uqTgtm6wCDzVZ2L06Oq01HVm7PvB2Lcjcv0cice8=,tag:LGpZjA1mBedjNsHiL8zZlw==,type:str]SNS_FCM_PLATFORM_ARN=ENC[AES256_GCM,data:O6ew7+XWEv+dXWPE9OSkhOSVSYS3aPfE6VZ6teyE+rPy+FdeLiULbXdNb3Fv95MHG2qeIyRd4Yich5YAfhl7wo3iJ0HPD1pjx40=,iv:LaTj2kYSe1nUPPPu55XM958kgoIWCfAj0smlS0y3BEE=,tag:df4GKVBv/WjkRSD5NquKgw==,type:str]@@ -119,6 +116,7 @@ SYNC_SERVICE_URL=ENC[AES256_GCM,data:7k/Qclz7BViNvMA+2Zj1FTn2lZB0b5cTPT8=,iv:DhsUPLOAD_STAGING_BUCKET=ENC[AES256_GCM,data:9BDW8fGIhTm5gR50QEi5R7p7hWCb1hQcEw==,iv:OScwidcFszBrK+xgNlhj3DhSnmAWlC/rWlnrorYWFE0=,tag:b2COGF0q3EyFN3w6FPR2xA==,type:str]WEB_SOCKET_RESPONSE_LAMBDA=ENC[AES256_GCM,data:a+J9vhbLyTOBEi8gbH1x3tMfSB0F30vSE5l5YffzHw==,iv:iQW6njVXAjzLHVBYBJ/RfxCF3ukfHMPD6Ac15XA0m28=,tag:qtTpN4DJedB4AMwxTa/9/g==,type:str]XAI_API_KEY=ENC[AES256_GCM,data:HuXwLSu77ewMIm9yY64W1kC/fB5tdGyeBg66aFrWae4JiX4h89S71soD0K8+blBs89RN20BIOu/L4+CWp15ssNyjcWGIPt39MOZS+DzXiaccPEZp8nE=,iv:dUiPvh7PVy4vmTrEZbkROjtKi+JHwOsgEbrTZsnEDhQ=,tag:JUZjWTlxMyxE+FQspCfmVA==,type:str]+LOCAL_AWS_URL=ENC[AES256_GCM,data:cxd2X/ypOUosveUk9bEBVxfjVMXSJo6T,iv:ySA8O+lkwpFTuy5t/pp16yzAEvwt8pxw+LMkg7lphbQ=,tag:woBg4icBjdlUPnezglYoew==,type:str]sops_kms__list_0__map_arn=arn:aws:kms:us-east-1:569036502058:key/mrk-cab29bf948044eb79005a81f48d40e93sops_kms__list_0__map_aws_profile=sops_kms__list_0__map_created_at=2026-01-28T16:40:14Z@@ -127,7 +125,7 @@ sops_kms__list_1__map_arn=arn:aws:kms:us-west-1:569036502058:key/mrk-cab29bf9480sops_kms__list_1__map_aws_profile=sops_kms__list_1__map_created_at=2026-01-28T16:40:14Zsops_kms__list_1__map_enc=AQICAHjuYcSMsjB0lKJtZ3DIAvxF8N3RNRn5KZaAN74Et6122wH7b4JlAvaWtc9qfZsK1ltuAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMzUJwUClhENkLZKu/AgEQgDuL2H+jcICJ778MdZzyMJxq9wOIs28CPM5lPJYxyaK3FcDuIG8YvWnwELpxOIVZGtYABanUv1192dNCzA==-sops_lastmodified=2026-01-28T17:44:27Z-sops_mac=ENC[AES256_GCM,data:+9ElFlP/UpyVexAvabz+Pal/eHhorxp2qj/huiMcwITYLaBo21Y/mBILqZDFAwtvAmu5Ei89Dgd6mCTUhYMKFJ6cVQ6GNr6HdzCW8qdkLqMEPi0R8+P1t+FwgxW42/6GQq7LhjSDQ0wS8nSAqzWdZSd+IIujBpiFNmYQ7DQn5Gs=,iv:wAK9M/TELXSEz+6XHZjFP+niKeCCRDl1a2ufRoAj+kg=,tag:fd02BsX9/jx8vhV3csyYMA==,type:str]+sops_lastmodified=2026-01-29T14:24:23Z+sops_mac=ENC[AES256_GCM,data:jX8Y5G+B74q5mw3S/cps9xAUnCHXQm3Q7Zs/ebOletUhpPgEGO9e2YcU0kXeGnu0HlCRqAQn8l3gRstI691LK9G30PfslP2rL7oyDEyqwDSHu+WLOM+qCLAasDqp162vaVRT7LuZRVAD+WzvHJgNQ+ZNE/YnolL7T8d5rTDbfXM=,iv:mAFUa1v360BTYgvLduohwcLdSmZWH2I0H9M5Ahk7kLM=,tag:rDE4kKkhojh0Gkflfgajew==,type:str]sops_unencrypted_suffix=_unencryptedsops_version=3.11.0diff --git a/justfile b/justfileindex 5a4ccf1176..d5bfd396a5 100644--- a/justfile+++ b/justfile@@ -15,6 +15,9 @@ fix_environment *ARGS:get_environment *ARGS:sops --input-type dotenv --output-type dotenv -d .env-local{{ ARGS }}.enc > .env+edit_environment *ARGS:+ sops --input-type dotenv --output-type dotenv .env-local{{ ARGS}}.enc+# Creates the docker networks then runs the databases# This is used when initializing your databasesrun_dbs *ARGS:@@ -42,6 +45,9 @@ build_run_local *ARGS:stop-local:docker compose down+stop-databases:+ docker-compose -f docker-compose-databases.yml down+# Start LocalStack for local AWS emulationstart_localstack:docker run -d --name localstack \diff --git a/rust/cloud-storage/Cargo.lock b/rust/cloud-storage/Cargo.lockindex 05cd0f33ef..82b08aee53 100644--- a/rust/cloud-storage/Cargo.lock+++ b/rust/cloud-storage/Cargo.lock@@ -515,7 +515,6 @@ dependencies = ["anyhow","async-stripe","async-stripe-webhook",- "aws-config","aws-sdk-secretsmanager","aws-sdk-sesv2","aws-sdk-sqs",@@ -532,6 +531,7 @@ dependencies = ["http-body-util","jsonwebtoken","macro_auth",+ "macro_aws_config","macro_cache_client","macro_cors","macro_db_client",@@ -755,6 +755,28 @@ dependencies = ["tracing",]+[[package]]+name = "aws-sdk-dynamodbstreams"+version = "1.92.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6f1738cf234a9ae199475a533e9be05945e3e0b44d91ae1017c64e8197acdfff"+dependencies = [+ "aws-credential-types",+ "aws-runtime",+ "aws-smithy-async",+ "aws-smithy-http 0.62.6",+ "aws-smithy-json",+ "aws-smithy-runtime",+ "aws-smithy-runtime-api",+ "aws-smithy-types",+ "aws-types",+ "bytes",+ "fastrand 2.3.0",+ "http 0.2.12",+ "regex-lite",+ "tracing",+]+[[package]]name = "aws-sdk-ecs"version = "1.104.0"@@ -1898,7 +1920,6 @@ dependencies = ["ai_format","anyhow","async-trait",- "aws-config","aws-sdk-secretsmanager","aws-sdk-sqs","axum",@@ -1915,6 +1936,7 @@ dependencies = ["http-body-util","jsonwebtoken","macro_auth",+ "macro_aws_config","macro_axum_utils","macro_cors","macro_entrypoint",@@ -1977,7 +1999,6 @@ name = "connection_gateway"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-dynamodb","aws-sdk-secretsmanager","axum",@@ -1990,6 +2011,7 @@ dependencies = ["http-body-util","itertools 0.14.0","macro_auth",+ "macro_aws_config","macro_entrypoint","macro_env","macro_env_var",@@ -2087,7 +2109,6 @@ version = "0.1.0"dependencies = ["anyhow","async-trait",- "aws-config","aws-sdk-secretsmanager","aws-sdk-sqs","axum",@@ -2095,6 +2116,7 @@ dependencies = ["contacts_db_client","http-body-util","macro_auth",+ "macro_aws_config","macro_cors","macro_entrypoint","macro_env",@@ -2117,7 +2139,6 @@ name = "convert_service"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-lambda","aws-sdk-s3","aws-sdk-secretsmanager",@@ -2126,6 +2147,7 @@ dependencies = ["futures","http-body-util","lambda_client",+ "macro_aws_config","macro_cors","macro_db_client","macro_entrypoint",@@ -2427,11 +2449,11 @@ name = "dataloss_prevention_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-s3","aws-sdk-sns","aws_lambda_events","lambda_runtime",+ "macro_aws_config","macro_entrypoint","s3_client","sns_client",@@ -2464,7 +2486,6 @@ name = "delete_document_worker"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-s3","aws-sdk-secretsmanager","aws-sdk-sqs",@@ -2472,6 +2493,7 @@ dependencies = ["chrono","comms_service_client","futures",+ "macro_aws_config","macro_cors","macro_db_client","macro_entrypoint",@@ -2498,13 +2520,13 @@ name = "deleted_item_poller"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws-smithy-types","aws_lambda_events","chrono","futures","lambda_runtime",+ "macro_aws_config","macro_db_client","macro_entrypoint","macro_env",@@ -2637,7 +2659,6 @@ dependencies = ["ai_tools","anyhow","async-openai",- "aws-config","aws-sdk-secretsmanager","aws-sdk-sqs","axum",@@ -2660,6 +2681,7 @@ dependencies = ["lexical_client","log","macro_auth",+ "macro_aws_config","macro_cors","macro_db_client","macro_entrypoint",@@ -2721,7 +2743,6 @@ name = "document_storage_service"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-dynamodb","aws-sdk-s3","aws-sdk-secretsmanager",@@ -2748,6 +2769,7 @@ dependencies = ["jsonwebtoken","lazy_static","macro_auth",+ "macro_aws_config","macro_axum_utils","macro_cors","macro_db_client",@@ -2833,11 +2855,11 @@ version = "0.1.0"dependencies = ["ai","anyhow",- "aws-config","aws-sdk-s3","aws_lambda_events","chrono","lambda_runtime",+ "macro_aws_config","macro_entrypoint","macro_env_var","mockall",@@ -2858,7 +2880,6 @@ name = "docx_unzip_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-lambda","aws-sdk-s3","aws-sdk-sqs",@@ -2868,6 +2889,7 @@ dependencies = ["futures","lambda_client","lambda_runtime",+ "macro_aws_config","macro_db_client","macro_entrypoint","macro_env",@@ -2975,9 +2997,9 @@ name = "dynamodb_client"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-dynamodb","chrono",+ "macro_aws_config","model","models_bulk_upload","strum",@@ -3112,11 +3134,11 @@ name = "email_refresh_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws_lambda_events","chrono","lambda_runtime",+ "macro_aws_config","macro_db_migrator","macro_entrypoint","macro_env",@@ -3134,11 +3156,11 @@ name = "email_scheduled_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws_lambda_events","chrono","lambda_runtime",+ "macro_aws_config","macro_db_migrator","macro_entrypoint","macro_env",@@ -3156,7 +3178,6 @@ dependencies = ["ammonia","anyhow","authentication_service_client",- "aws-config","aws-sdk-s3","aws-sdk-secretsmanager","aws-sdk-sqs",@@ -3181,6 +3202,7 @@ dependencies = ["infer 0.19.0","lol_html","macro_auth",+ "macro_aws_config","macro_cors","macro_entrypoint","macro_env",@@ -3250,10 +3272,10 @@ name = "email_sfs_delete_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws_lambda_events","lambda_runtime",+ "macro_aws_config","macro_entrypoint","macro_env","sqlx",@@ -4774,7 +4796,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"dependencies = ["cfg-if",- "windows-targets 0.48.5",+ "windows-targets 0.52.6",][[package]]@@ -4815,6 +4837,22 @@ version = "0.7.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"+[[package]]+name = "local_stream_processor"+version = "0.1.0"+dependencies = [+ "aws-sdk-dynamodb",+ "aws-sdk-dynamodbstreams",+ "chrono",+ "macro_aws_config",+ "macro_env_var",+ "reqwest",+ "serde",+ "serde_json",+ "tokio",+ "tracing",+]+[[package]]name = "lock_api"version = "0.4.12"@@ -4921,6 +4959,17 @@ dependencies = ["urlencoding",]+[[package]]+name = "macro_aws_config"+version = "0.1.0"+dependencies = [+ "aws-config",+ "macro_env",+ "macro_env_var",+ "thiserror 2.0.17",+ "tracing",+]+[[package]]name = "macro_axum_utils"version = "0.1.0"@@ -5065,8 +5114,8 @@ name = "macro_notify"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs",+ "macro_aws_config","macro_uuid","model","model_notifications",@@ -5888,7 +5937,6 @@ version = "0.1.0"dependencies = ["anyhow","authentication_service_client",- "aws-config","aws-sdk-secretsmanager","aws-sdk-sesv2","aws-sdk-sns",@@ -5902,6 +5950,7 @@ dependencies = ["futures","http-body-util","macro_auth",+ "macro_aws_config","macro_cache_client","macro_cors","macro_entrypoint",@@ -6167,10 +6216,10 @@ name = "organization_retention_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws_lambda_events","lambda_runtime",+ "macro_aws_config","macro_entrypoint","openssl","sqlx",@@ -6184,10 +6233,10 @@ name = "organization_retention_trigger"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws_lambda_events","lambda_runtime",+ "macro_aws_config","macro_entrypoint","openssl","serde_json",@@ -6653,7 +6702,6 @@ version = "0.1.0"dependencies = ["anyhow","async-trait",- "aws-config","aws-sdk-secretsmanager","axum","chrono",@@ -6661,6 +6709,7 @@ dependencies = ["email_db_client","http-body-util","macro_auth",+ "macro_aws_config","macro_cors","macro_entrypoint","macro_env",@@ -7546,7 +7595,6 @@ name = "search_processing_service"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-s3","aws-sdk-secretsmanager","aws-sdk-sqs",@@ -7559,6 +7607,7 @@ dependencies = ["futures","http-body-util","lexical_client",+ "macro_aws_config","macro_cors","macro_db_client","macro_entrypoint",@@ -7597,7 +7646,6 @@ name = "search_service"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-secretsmanager","axum","chrono",@@ -7610,6 +7658,7 @@ dependencies = ["indexmap 2.12.1","item_filters","macro_auth",+ "macro_aws_config","macro_cors","macro_db_client","macro_entrypoint",@@ -7652,10 +7701,10 @@ name = "search_upload_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws_lambda_events","lambda_runtime",+ "macro_aws_config","macro_entrypoint","model_file_type","openssl",@@ -8007,9 +8056,9 @@ name = "sha_cleanup_worker"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-s3","futures",+ "macro_aws_config","macro_entrypoint","macro_env","mockall",@@ -8509,7 +8558,6 @@ name = "static_file_service"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-dynamodb","aws-sdk-s3","aws-sdk-secretsmanager",@@ -8517,6 +8565,7 @@ dependencies = ["axum","chrono","macro_auth",+ "macro_aws_config","macro_cors","macro_entrypoint","macro_env",@@ -9358,7 +9407,6 @@ name = "upload_extractor_lambda_handler"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-s3","aws-sdk-sqs","aws_lambda_events",@@ -9368,6 +9416,7 @@ dependencies = ["dynamodb_client","futures","lambda_runtime",+ "macro_aws_config","macro_entrypoint","model","model-entity",@@ -9391,11 +9440,11 @@ name = "upload_extractor_lambda_trigger"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-sqs","aws_lambda_events","dynamodb_client","lambda_runtime",+ "macro_aws_config","macro_entrypoint","models_bulk_upload","openssl",@@ -9808,7 +9857,7 @@ version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"dependencies = [- "windows-sys 0.48.0",+ "windows-sys 0.59.0",][[package]]@@ -10106,10 +10155,10 @@ name = "worker_trigger"version = "0.1.0"dependencies = ["anyhow",- "aws-config","aws-sdk-ecs","aws_lambda_events","lambda_runtime",+ "macro_aws_config","macro_entrypoint","macro_env","mockall",diff --git a/rust/cloud-storage/Cargo.toml b/rust/cloud-storage/Cargo.tomlindex d1d7c0fa51..47d67674c0 100644--- a/rust/cloud-storage/Cargo.toml+++ b/rust/cloud-storage/Cargo.toml@@ -44,7 +44,9 @@ members = ["integration_tests/*","lambda_client","lexical_client",+ "local_stream_processor","macro_auth",+ "macro_aws_config","macro_cache_client","macro_client_errors","macro_cors",diff --git a/rust/cloud-storage/authentication_service/Cargo.toml b/rust/cloud-storage/authentication_service/Cargo.tomlindex 9eeaeef7fc..c792f53391 100644--- a/rust/cloud-storage/authentication_service/Cargo.toml+++ b/rust/cloud-storage/authentication_service/Cargo.toml@@ -34,8 +34,8 @@ async-stripe = { workspace = true, default-features = false, features = ["runtime-tokio-hyper",] }async-stripe-webhook = { version = "1.0.0-alpha.4", default-features = false }-aws-config = { workspace = true }aws-sdk-secretsmanager = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-sesv2 = { workspace = true }aws-sdk-sqs = { workspace = true }axum = { workspace = true, features = ["macros"] }diff --git a/rust/cloud-storage/authentication_service/src/main.rs b/rust/cloud-storage/authentication_service/src/main.rsindex 51ffba49a6..ab4c63f570 100644--- a/rust/cloud-storage/authentication_service/src/main.rs+++ b/rust/cloud-storage/authentication_service/src/main.rs@@ -38,13 +38,9 @@ async fn main() -> anyhow::Result<()> {MacroEntrypoint::default().init();let env = Environment::new_or_prod();- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(¯o_aws_config::get_macro_aws_config().await),+ );let internal_api_key = secretsmanager_client.get_maybe_secret_value(env, InternalApiSecretKey::new()?)@@ -165,12 +161,7 @@ async fn main() -> anyhow::Result<()> {tracing::trace!("initialized stripe client");let ses_client = ses_client::Ses::new(- aws_sdk_sesv2::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ),+ aws_sdk_sesv2::Client::new(¯o_aws_config::get_macro_aws_config().await),&config.environment.to_string(),);@@ -186,10 +177,7 @@ async fn main() -> anyhow::Result<()> {tracing::trace!("initialized macro_notify client");let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).search_event_queue(&config.search_event_queue);tracing::trace!("initialized sqs client");diff --git a/rust/cloud-storage/comms_service/Cargo.toml b/rust/cloud-storage/comms_service/Cargo.tomlindex 0af569a2e9..296f4e05ee 100644--- a/rust/cloud-storage/comms_service/Cargo.toml+++ b/rust/cloud-storage/comms_service/Cargo.toml@@ -29,7 +29,6 @@ service = ["comms_db_client"]ai_format = { path = "../ai_format" }anyhow = { workspace = true }async-trait = { workspace = true }-aws-config = { workspace = true }aws-sdk-secretsmanager = { workspace = true }aws-sdk-sqs = { workspace = true }axum = { workspace = true, features = ["tower-log", "ws"] }@@ -46,6 +45,7 @@ futures = { workspace = true }http-body-util = { workspace = true }jsonwebtoken.workspace = truemacro_auth = { path = "../macro_auth" }+macro_aws_config = { path = "../macro_aws_config" }macro_axum_utils = { path = "../macro_axum_utils" }macro_cors = { path = "../macro_cors" }macro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/comms_service/src/bin/backfill_search.rs b/rust/cloud-storage/comms_service/src/bin/backfill_search.rsindex bea18dff00..be61127f47 100644--- a/rust/cloud-storage/comms_service/src/bin/backfill_search.rs+++ b/rust/cloud-storage/comms_service/src/bin/backfill_search.rs@@ -22,12 +22,9 @@ async fn main() -> anyhow::Result<()> {let search_event_queue =std::env::var("SEARCH_EVENT_QUEUE").context("SEARCH_EVENT_QUEUE not set")?;- let queue_aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;- let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&queue_aws_config))+ let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&aws_config)).search_event_queue(&search_event_queue);let limit = 5000;diff --git a/rust/cloud-storage/comms_service/src/main.rs b/rust/cloud-storage/comms_service/src/main.rsindex ac34c06924..be96b354cb 100644--- a/rust/cloud-storage/comms_service/src/main.rs+++ b/rust/cloud-storage/comms_service/src/main.rs@@ -56,13 +56,11 @@ async fn main() -> anyhow::Result<()> {"initialized db connection");- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let aws_config = macro_aws_config::get_macro_aws_config().await;++ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(&aws_config),+ );tracing::trace!("initialized secretsmanager client");let macro_notify_client = macro_notify::MacroNotify::new(@@ -78,14 +76,9 @@ async fn main() -> anyhow::Result<()> {config.document_storage_service_url.clone(),);- let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ))- .contacts_queue(&config.contacts_queue)- .search_event_queue(&config.search_event_queue);+ let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&aws_config))+ .contacts_queue(&config.contacts_queue)+ .search_event_queue(&config.search_event_queue);let macro_db = PgPoolOptions::new().min_connections(1)diff --git a/rust/cloud-storage/connection_gateway/Cargo.toml b/rust/cloud-storage/connection_gateway/Cargo.tomlindex 19cf6bc2e8..c3f0ef2c74 100644--- a/rust/cloud-storage/connection_gateway/Cargo.toml+++ b/rust/cloud-storage/connection_gateway/Cargo.toml@@ -25,8 +25,8 @@ path = "src/openapi.rs"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-dynamodb = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-secretsmanager = { workspace = true }axum = { workspace = true, features = ["macros", "tower-log", "ws"] }chrono = { workspace = true }diff --git a/rust/cloud-storage/connection_gateway/scripts/stale_connections.rs b/rust/cloud-storage/connection_gateway/scripts/stale_connections.rsindex 3e6c5599f8..e00bce30f7 100644--- a/rust/cloud-storage/connection_gateway/scripts/stale_connections.rs+++ b/rust/cloud-storage/connection_gateway/scripts/stale_connections.rs@@ -108,9 +108,7 @@ impl ConnectionInfo {#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> {// Initialize AWS config- let config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .load()- .await;+ let config = macro_aws_config::get_macro_aws_config().await;let client = aws_sdk_dynamodb::Client::new(&config);// Get table name from environment variable or command line argumentdiff --git a/rust/cloud-storage/connection_gateway/src/main.rs b/rust/cloud-storage/connection_gateway/src/main.rsindex 2be352968d..c284861ef7 100644--- a/rust/cloud-storage/connection_gateway/src/main.rs+++ b/rust/cloud-storage/connection_gateway/src/main.rs@@ -44,13 +44,11 @@ async fn main() -> Result<()> {// Parse our configuration from the environment.let config = Arc::new(Config::from_env(EnvVars::unwrap_new()));- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let aws_config = macro_aws_config::get_macro_aws_config().await;++ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(&aws_config),+ );let jwt_args =JwtValidationArgs::new_with_secret_manager(config.environment, &secretsmanager_client).await?;@@ -69,8 +67,7 @@ async fn main() -> Result<()> {]).allow_origin(ORIGINS);- let builder = aws_config::defaults(aws_config::BehaviorVersion::latest()).region("us-east-1");- let dynamodb_client = aws_sdk_dynamodb::Client::new(&builder.load().await);+ let dynamodb_client = aws_sdk_dynamodb::Client::new(&aws_config);let redis_client = Arc::new(redis::Client::open(config.redis_host.as_ref())diff --git a/rust/cloud-storage/contacts_service/Cargo.toml b/rust/cloud-storage/contacts_service/Cargo.tomlindex 8bd0e0a140..021a1409ab 100644--- a/rust/cloud-storage/contacts_service/Cargo.toml+++ b/rust/cloud-storage/contacts_service/Cargo.toml@@ -16,8 +16,8 @@ path = "src/openapi.rs"[dependencies]anyhow = { workspace = true }async-trait = { workspace = true }-aws-config = { workspace = true }aws-sdk-secretsmanager = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-sqs = { workspace = true }axum = { workspace = true }connection_gateway = { path = "../connection_gateway" }diff --git a/rust/cloud-storage/contacts_service/examples/worker.rs b/rust/cloud-storage/contacts_service/examples/worker.rsindex 84528d63d1..3e7096627c 100644--- a/rust/cloud-storage/contacts_service/examples/worker.rs+++ b/rust/cloud-storage/contacts_service/examples/worker.rs@@ -9,11 +9,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {let notification_queue: &'static str = "http://localhost:4566/000000000000/my-test-queue";let notification_queue_max_messages = 10;let notification_queue_wait_time_seconds = 3;- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(notification_queue)- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = aws_sdk_sqs::Client::new(&aws_config);let sqs = sqs_worker::SQSWorker::new(sqs_client,diff --git a/rust/cloud-storage/contacts_service/src/main.rs b/rust/cloud-storage/contacts_service/src/main.rsindex 0bb1f7d763..df003cf811 100644--- a/rust/cloud-storage/contacts_service/src/main.rs+++ b/rust/cloud-storage/contacts_service/src/main.rs@@ -40,18 +40,7 @@ async fn connect_to_database(config: &Config) -> anyhow::Result<PgPool> {async fn create_sqs_worker(config: &Config) -> SQSWorker {let queue_url = config.queue_url.clone();- let aws_config = if queue_url.contains("localhost") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&queue_url)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };+ let aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = aws_sdk_sqs::Client::new(&aws_config);sqs_worker::SQSWorker::new(@@ -72,13 +61,9 @@ async fn main() -> anyhow::Result<()> {let db_clone = db.clone();let sqs_worker = create_sqs_worker(&config).await;- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(¯o_aws_config::get_macro_aws_config().await),+ );let internal_api_secret = secretsmanager_client.get_maybe_secret_value(config.environment, InternalApiSecretKey::new()?)diff --git a/rust/cloud-storage/contacts_service/src/queue.rs b/rust/cloud-storage/contacts_service/src/queue.rsindex b83fd492db..84c4abeff3 100644--- a/rust/cloud-storage/contacts_service/src/queue.rs+++ b/rust/cloud-storage/contacts_service/src/queue.rs@@ -273,10 +273,7 @@ mod tests {use std::collections::HashSet;async fn sqs_dummy() -> SQSWorker {- let config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let config = macro_aws_config::get_macro_aws_config().await;let client = aws_sdk_sqs::Client::new(&config);SQSWorker::new(client, "nothing".to_string(), 1, 1)}diff --git a/rust/cloud-storage/convert_service/Cargo.toml b/rust/cloud-storage/convert_service/Cargo.tomlindex 23cc3ab687..577dacac43 100644--- a/rust/cloud-storage/convert_service/Cargo.toml+++ b/rust/cloud-storage/convert_service/Cargo.toml@@ -11,7 +11,6 @@ local_queue = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-lambda = { workspace = true }aws-sdk-s3 = { workspace = true }aws-sdk-secretsmanager = { workspace = true }@@ -20,6 +19,7 @@ axum = { workspace = true }futures = { workspace = true }http-body-util = { workspace = true }lambda_client = { path = "../lambda_client" }+macro_aws_config = { path = "../macro_aws_config" }macro_cors = { path = "../macro_cors" }macro_db_client = { path = "../macro_db_client" }macro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/convert_service/src/main.rs b/rust/cloud-storage/convert_service/src/main.rsindex efa7549e2a..d1cbea5223 100644--- a/rust/cloud-storage/convert_service/src/main.rs+++ b/rust/cloud-storage/convert_service/src/main.rs@@ -20,10 +20,7 @@ async fn main() -> anyhow::Result<()> {let env = Environment::new_or_prod();MacroEntrypoint::new(env).init();- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let secretsmanager_client = secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(&aws_config),@@ -45,18 +42,7 @@ async fn main() -> anyhow::Result<()> {tracing::trace!("initialized config");- let queue_aws_config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&config.convert_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };+ let queue_aws_config = macro_aws_config::get_macro_aws_config().await;let s3_client = s3_client::S3::new(aws_sdk_s3::Client::new(&aws_config));tracing::trace!("initialized s3 client");diff --git a/rust/cloud-storage/dataloss_prevention_handler/Cargo.toml b/rust/cloud-storage/dataloss_prevention_handler/Cargo.tomlindex ee27dec252..3c2af7a1b7 100644--- a/rust/cloud-storage/dataloss_prevention_handler/Cargo.toml+++ b/rust/cloud-storage/dataloss_prevention_handler/Cargo.toml@@ -7,8 +7,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-s3 = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-sns = { workspace = true }aws_lambda_events = { workspace = true, features = ["s3"] }lambda_runtime = { workspace = true }diff --git a/rust/cloud-storage/dataloss_prevention_handler/src/main.rs b/rust/cloud-storage/dataloss_prevention_handler/src/main.rsindex 8398e2fd45..bd1f94b21d 100644--- a/rust/cloud-storage/dataloss_prevention_handler/src/main.rs+++ b/rust/cloud-storage/dataloss_prevention_handler/src/main.rs@@ -14,10 +14,7 @@ async fn main() -> Result<(), Error> {tracing::trace!("initiating lambda");- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let s3_client = s3_client::S3::new(aws_sdk_s3::Client::new(&aws_config));tracing::trace!("initialized s3 client");diff --git a/rust/cloud-storage/delete_document_worker/Cargo.toml b/rust/cloud-storage/delete_document_worker/Cargo.tomlindex 593da9c435..8ad55fb022 100644--- a/rust/cloud-storage/delete_document_worker/Cargo.toml+++ b/rust/cloud-storage/delete_document_worker/Cargo.toml@@ -10,8 +10,8 @@ local_queue = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-s3 = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-secretsmanager = { workspace = true }aws-sdk-sqs = { workspace = true }axum = { workspace = true }diff --git a/rust/cloud-storage/delete_document_worker/src/main.rs b/rust/cloud-storage/delete_document_worker/src/main.rsindex 0ef50f334a..d0532a1e94 100644--- a/rust/cloud-storage/delete_document_worker/src/main.rs+++ b/rust/cloud-storage/delete_document_worker/src/main.rs@@ -40,29 +40,12 @@ pub async fn main() -> anyhow::Result<()> {"initialized db connection");- let queue_aws_config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&config.delete_document_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };-- // Normal config for non-local stack items- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let s3_client = s3_client::S3::new(aws_sdk_s3::Client::new(&aws_config));let delete_document_worker = sqs_worker::SQSWorker::new(- aws_sdk_sqs::Client::new(&queue_aws_config),+ aws_sdk_sqs::Client::new(&aws_config),config.delete_document_queue.clone(),config.queue_max_messages,config.queue_wait_time_seconds,diff --git a/rust/cloud-storage/deleted_item_poller/Cargo.toml b/rust/cloud-storage/deleted_item_poller/Cargo.tomlindex 73b9bc4450..b25a7a7897 100644--- a/rust/cloud-storage/deleted_item_poller/Cargo.toml+++ b/rust/cloud-storage/deleted_item_poller/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-smithy-types = { workspace = true }aws_lambda_events = { workspace = true, features = ["eventbridge"] }chrono = { workspace = true }diff --git a/rust/cloud-storage/deleted_item_poller/src/main.rs b/rust/cloud-storage/deleted_item_poller/src/main.rsindex a7795ac875..223387d4e9 100644--- a/rust/cloud-storage/deleted_item_poller/src/main.rs+++ b/rust/cloud-storage/deleted_item_poller/src/main.rs@@ -32,10 +32,7 @@ async fn main() -> Result<(), Error> {.context("could not connect to db")?;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).document_delete_queue(&config.document_delete_queue).chat_delete_queue(&config.chat_delete_queue)diff --git a/rust/cloud-storage/document_cognition_service/Cargo.toml b/rust/cloud-storage/document_cognition_service/Cargo.tomlindex 25e3f632da..a1ead32002 100644--- a/rust/cloud-storage/document_cognition_service/Cargo.toml+++ b/rust/cloud-storage/document_cognition_service/Cargo.toml@@ -29,8 +29,8 @@ ai_format = { path = "../ai_format" }ai_tools = { path = "../ai_tools" }anyhow = { workspace = true }async-openai = { workspace = true }-aws-config = { workspace = true }aws-sdk-secretsmanager = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-sqs = { workspace = true }axum = { workspace = true, features = ["tower-log", "ws"] }base64 = { workspace = true }diff --git a/rust/cloud-storage/document_cognition_service/src/bin/backfill_search.rs b/rust/cloud-storage/document_cognition_service/src/bin/backfill_search.rsindex 8b0f590c80..50413418cf 100644--- a/rust/cloud-storage/document_cognition_service/src/bin/backfill_search.rs+++ b/rust/cloud-storage/document_cognition_service/src/bin/backfill_search.rs@@ -23,12 +23,9 @@ async fn main() -> anyhow::Result<()> {let search_event_queue =std::env::var("SEARCH_EVENT_QUEUE").context("SEARCH_EVENT_QUEUE not set")?;- let queue_aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;- let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&queue_aws_config))+ let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&aws_config)).search_event_queue(&search_event_queue);let limit = 1000;diff --git a/rust/cloud-storage/document_cognition_service/src/main.rs b/rust/cloud-storage/document_cognition_service/src/main.rsindex 60d84226b6..7e8917e0d6 100644--- a/rust/cloud-storage/document_cognition_service/src/main.rs+++ b/rust/cloud-storage/document_cognition_service/src/main.rs@@ -60,35 +60,17 @@ async fn main() -> anyhow::Result<()> {"initialized db connection");- let queue_aws_client = if cfg!(feature = "local_queue") {- aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url("http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/")- .load()- .await,- )- } else {- aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- )- };+ let aws_config = macro_aws_config::get_macro_aws_config().await;+ let queue_aws_client = aws_sdk_sqs::Client::new(&aws_config);let sqs_client = sqs_client::SQS::new(queue_aws_client).document_text_extractor_queue(&config.document_text_extractor_queue).chat_delete_queue(&config.chat_delete_queue).search_event_queue(&config.search_event_queue);- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(&aws_config),+ );let internal_auth_key = secretsmanager_client::LocalOrRemoteSecret::Local(InternalApiSecretKey::new().context("failed to create internal auth key")?,diff --git a/rust/cloud-storage/document_storage_service/Cargo.toml b/rust/cloud-storage/document_storage_service/Cargo.tomlindex 347f73797a..dbcc29fb8e 100644--- a/rust/cloud-storage/document_storage_service/Cargo.toml+++ b/rust/cloud-storage/document_storage_service/Cargo.toml@@ -30,7 +30,6 @@ location_check = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-dynamodb = { workspace = true }aws-sdk-s3 = { workspace = true }aws-sdk-secretsmanager = { workspace = true }@@ -57,6 +56,7 @@ http-body-util = { workspace = true }jsonwebtoken = { workspace = true }lazy_static = { workspace = true }macro_auth = { path = "../macro_auth" }+macro_aws_config = { path = "../macro_aws_config" }macro_axum_utils = { path = "../macro_axum_utils" }macro_cors = { path = "../macro_cors" }macro_db_client = { path = "../macro_db_client" }diff --git a/rust/cloud-storage/document_storage_service/src/bin/backfill_search.rs b/rust/cloud-storage/document_storage_service/src/bin/backfill_search.rsindex e66a2f6edd..127f59bc3b 100644--- a/rust/cloud-storage/document_storage_service/src/bin/backfill_search.rs+++ b/rust/cloud-storage/document_storage_service/src/bin/backfill_search.rs@@ -38,10 +38,7 @@ async fn main() -> anyhow::Result<()> {let search_event_queue =std::env::var("SEARCH_EVENT_QUEUE").context("SEARCH_EVENT_QUEUE not set")?;- let queue_aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let queue_aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&queue_aws_config)).search_event_queue(&search_event_queue);diff --git a/rust/cloud-storage/document_storage_service/src/main.rs b/rust/cloud-storage/document_storage_service/src/main.rsindex 0f9f2e1e4d..ab9155df4d 100644--- a/rust/cloud-storage/document_storage_service/src/main.rs+++ b/rust/cloud-storage/document_storage_service/src/main.rs@@ -17,7 +17,6 @@ use email::{domain::service::EmailServiceImpl, outbound::EmailPgRepo};use frecency::{domain::services::FrecencyQueryServiceImpl, outbound::postgres::FrecencyPgStorage};use macro_auth::middleware::decode_jwt::JwtValidationArgs;use macro_entrypoint::MacroEntrypoint;-use macro_env_var::env_var;use macro_middleware::auth::internal_access::InternalApiSecretKey;use macro_redis_cluster_client::Redis;use properties::{@@ -43,10 +42,7 @@ async fn main() -> anyhow::Result<()> {MacroEntrypoint::default().init();let env = Environment::new_or_prod();- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let secretsmanager_client = secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(&aws_config),@@ -91,30 +87,7 @@ async fn main() -> anyhow::Result<()> {"initialized db connection");- // Create DynamoDB client with local endpoint for local environment- // If DynamoEndpointUrl is not set, use AWS DynamoDB even in local mode- let dynamo_db = if matches!(config.environment, Environment::Local) {- env_var!(- struct DynamoEndpointUrl;- );- match DynamoEndpointUrl::new() {- Ok(endpoint_url) => {- tracing::info!("Using local DynamoDB endpoint: {}", endpoint_url.as_ref());- let local_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(endpoint_url.to_string())- .load()- .await;- aws_sdk_dynamodb::Client::new(&local_config)- }- Err(_) => {- tracing::info!("DynamoEndpointUrl not set, using AWS DynamoDB");- aws_sdk_dynamodb::Client::new(&aws_config)- }- }- } else {- aws_sdk_dynamodb::Client::new(&aws_config)- };+ let dynamo_db = aws_sdk_dynamodb::Client::new(&aws_config);let dynamodb_client = DynamodbClient::new_from_client(dynamo_db.clone(),diff --git a/rust/cloud-storage/document_text_extractor/Cargo.toml b/rust/cloud-storage/document_text_extractor/Cargo.tomlindex 0e018823d3..327540958e 100644--- a/rust/cloud-storage/document_text_extractor/Cargo.toml+++ b/rust/cloud-storage/document_text_extractor/Cargo.toml@@ -12,8 +12,8 @@ macos = [][dependencies]ai = { path = "../ai" }anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-s3 = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["eventbridge","s3",diff --git a/rust/cloud-storage/document_text_extractor/src/main.rs b/rust/cloud-storage/document_text_extractor/src/main.rsindex f39b531d2d..590ab80ebb 100644--- a/rust/cloud-storage/document_text_extractor/src/main.rs+++ b/rust/cloud-storage/document_text_extractor/src/main.rs@@ -43,10 +43,7 @@ async fn main() -> Result<(), Error> {tracing::trace!("initialized db client");- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let s3_client = service::s3::S3::new(aws_sdk_s3::Client::new(&aws_config));tracing::trace!("initialized s3 client");diff --git a/rust/cloud-storage/docx_unzip_handler/Cargo.toml b/rust/cloud-storage/docx_unzip_handler/Cargo.tomlindex 3dfac66576..421c0614af 100644--- a/rust/cloud-storage/docx_unzip_handler/Cargo.toml+++ b/rust/cloud-storage/docx_unzip_handler/Cargo.toml@@ -7,8 +7,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-lambda = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-s3 = { workspace = true }aws-sdk-sqs = { workspace = true }aws-smithy-types = { workspace = true }diff --git a/rust/cloud-storage/docx_unzip_handler/src/main.rs b/rust/cloud-storage/docx_unzip_handler/src/main.rsindex d24dd5ca15..521d3621aa 100644--- a/rust/cloud-storage/docx_unzip_handler/src/main.rs+++ b/rust/cloud-storage/docx_unzip_handler/src/main.rs@@ -40,10 +40,7 @@ async fn main() -> Result<(), Error> {tracing::trace!("initialized db connection");- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let s3_client = s3_client::S3::new(aws_sdk_s3::Client::new(&aws_config));tracing::trace!("initialized s3 client");diff --git a/rust/cloud-storage/dynamodb_client/Cargo.toml b/rust/cloud-storage/dynamodb_client/Cargo.tomlindex e65874c01d..d0940ff5dc 100644--- a/rust/cloud-storage/dynamodb_client/Cargo.toml+++ b/rust/cloud-storage/dynamodb_client/Cargo.toml@@ -9,8 +9,8 @@ local = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-dynamodb = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }chrono = { workspace = true }model = { path = "../model" }models_bulk_upload = { path = "../models_bulk_upload" }diff --git a/rust/cloud-storage/dynamodb_client/src/lib.rs b/rust/cloud-storage/dynamodb_client/src/lib.rsindex d7c0e09e63..94809a90a1 100644--- a/rust/cloud-storage/dynamodb_client/src/lib.rs+++ b/rust/cloud-storage/dynamodb_client/src/lib.rs@@ -1,4 +1,4 @@-use aws_config::SdkConfig;+use macro_aws_config::SdkConfig;mod bulk_upload;diff --git a/rust/cloud-storage/email_refresh_handler/Cargo.toml b/rust/cloud-storage/email_refresh_handler/Cargo.tomlindex b557061f6e..471ef32b80 100644--- a/rust/cloud-storage/email_refresh_handler/Cargo.toml+++ b/rust/cloud-storage/email_refresh_handler/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["eventbridge"] }chrono = { workspace = true }lambda_runtime = { workspace = true }diff --git a/rust/cloud-storage/email_refresh_handler/src/main.rs b/rust/cloud-storage/email_refresh_handler/src/main.rsindex 385c6e526d..d975c214e6 100644--- a/rust/cloud-storage/email_refresh_handler/src/main.rs+++ b/rust/cloud-storage/email_refresh_handler/src/main.rs@@ -28,10 +28,7 @@ async fn main() -> Result<(), Error> {.context("could not connect to db")?;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).email_link_manager_queue(&config.link_manager_queue);diff --git a/rust/cloud-storage/email_scheduled_handler/Cargo.toml b/rust/cloud-storage/email_scheduled_handler/Cargo.tomlindex 3c3f7e4466..326c9aece7 100644--- a/rust/cloud-storage/email_scheduled_handler/Cargo.toml+++ b/rust/cloud-storage/email_scheduled_handler/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["eventbridge"] }chrono = { workspace = true }lambda_runtime = { workspace = true }diff --git a/rust/cloud-storage/email_scheduled_handler/src/main.rs b/rust/cloud-storage/email_scheduled_handler/src/main.rsindex 8fefc73ccb..bb6565391e 100644--- a/rust/cloud-storage/email_scheduled_handler/src/main.rs+++ b/rust/cloud-storage/email_scheduled_handler/src/main.rs@@ -28,10 +28,7 @@ async fn main() -> Result<(), Error> {.context("could not connect to db")?;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).email_scheduled_queue(&config.email_scheduled_queue);diff --git a/rust/cloud-storage/email_service/Cargo.toml b/rust/cloud-storage/email_service/Cargo.tomlindex ba403d37c3..6e42956291 100644--- a/rust/cloud-storage/email_service/Cargo.toml+++ b/rust/cloud-storage/email_service/Cargo.toml@@ -66,7 +66,7 @@ sfs_delete = []ammonia = "4.1.0"anyhow = { workspace = true }authentication_service_client = { path = "../authentication_service_client" }-aws-config = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws-sdk-s3 = { workspace = true }aws-sdk-secretsmanager = { workspace = true }aws-sdk-sqs = { workspace = true }diff --git a/rust/cloud-storage/email_service/src/bin/backfill_contacts/backfill_contacts.rs b/rust/cloud-storage/email_service/src/bin/backfill_contacts/backfill_contacts.rsindex 4a4e1db838..e4871747d8 100644--- a/rust/cloud-storage/email_service/src/bin/backfill_contacts/backfill_contacts.rs+++ b/rust/cloud-storage/email_service/src/bin/backfill_contacts/backfill_contacts.rs@@ -24,10 +24,7 @@ async fn main() -> anyhow::Result<()> {.map(|id| id.trim().to_string()).collect();- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&aws_config)).contacts_queue(&config.contacts_queue);diff --git a/rust/cloud-storage/email_service/src/bin/backfill_search/backfill_search.rs b/rust/cloud-storage/email_service/src/bin/backfill_search/backfill_search.rsindex 24241ca6c0..68c0414d22 100644--- a/rust/cloud-storage/email_service/src/bin/backfill_search/backfill_search.rs+++ b/rust/cloud-storage/email_service/src/bin/backfill_search/backfill_search.rs@@ -23,18 +23,7 @@ async fn main() -> anyhow::Result<()> {let search_event_queue =std::env::var("SEARCH_EVENT_QUEUE").context("SEARCH_EVENT_QUEUE not set")?;- let queue_aws_config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&search_event_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };+ let queue_aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&queue_aws_config)).search_event_queue(&search_event_queue);diff --git a/rust/cloud-storage/email_service/src/bin/pubsub_workers/pubsub_workers.rs b/rust/cloud-storage/email_service/src/bin/pubsub_workers/pubsub_workers.rsindex ca5e2b7476..afb3a93e8a 100644--- a/rust/cloud-storage/email_service/src/bin/pubsub_workers/pubsub_workers.rs+++ b/rust/cloud-storage/email_service/src/bin/pubsub_workers/pubsub_workers.rs@@ -16,11 +16,7 @@ async fn main() -> anyhow::Result<()> {MacroEntrypoint::default().init();let env = Environment::new_or_prod();- // new- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let s3_client = s3_client::S3::new(aws_sdk_s3::Client::new(&aws_config));@@ -73,18 +69,7 @@ async fn main() -> anyhow::Result<()> {.await.context("could not connect to backfill db")?;- let gmail_queue_aws_config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&config.gmail_inbox_sync_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };+ let gmail_queue_aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&gmail_queue_aws_config)).gmail_inbox_sync_queue(&config.gmail_inbox_sync_queue)diff --git a/rust/cloud-storage/email_service/src/main.rs b/rust/cloud-storage/email_service/src/main.rsindex 9c1d6f0c86..15d231ecee 100644--- a/rust/cloud-storage/email_service/src/main.rs+++ b/rust/cloud-storage/email_service/src/main.rs@@ -23,11 +23,7 @@ async fn main() -> anyhow::Result<()> {MacroEntrypoint::default().init();let env = Environment::new_or_prod();- // new- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let s3_client = s3_client::S3::new(aws_sdk_s3::Client::new(&aws_config));@@ -66,18 +62,7 @@ async fn main() -> anyhow::Result<()> {.await.context("could not connect to db")?;- let gmail_queue_aws_config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&config.gmail_inbox_sync_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };+ let gmail_queue_aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&gmail_queue_aws_config)).gmail_inbox_sync_queue(&config.gmail_inbox_sync_queue)diff --git a/rust/cloud-storage/email_sfs_delete_handler/Cargo.toml b/rust/cloud-storage/email_sfs_delete_handler/Cargo.tomlindex 256bb92e87..1aeff495de 100644--- a/rust/cloud-storage/email_sfs_delete_handler/Cargo.toml+++ b/rust/cloud-storage/email_sfs_delete_handler/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["eventbridge"] }lambda_runtime = { workspace = true }macro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/email_sfs_delete_handler/src/main.rs b/rust/cloud-storage/email_sfs_delete_handler/src/main.rsindex 0f51fdef48..06da956420 100644--- a/rust/cloud-storage/email_sfs_delete_handler/src/main.rs+++ b/rust/cloud-storage/email_sfs_delete_handler/src/main.rs@@ -26,10 +26,7 @@ async fn main() -> Result<(), Error> {.context("could not connect to db")?;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).sfs_delete_queue(&config.email_sfs_delete_queue);diff --git a/rust/cloud-storage/local_stream_processor/Cargo.toml b/rust/cloud-storage/local_stream_processor/Cargo.tomlindex e0bd6b77e6..944179f861 100644--- a/rust/cloud-storage/local_stream_processor/Cargo.toml+++ b/rust/cloud-storage/local_stream_processor/Cargo.toml@@ -5,12 +5,13 @@ publish = falseversion = "0.1.0"[dependencies]-aws-config = { workspace = true }aws-sdk-dynamodb = { workspace = true }aws-sdk-dynamodbstreams = "1.10"chrono = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }macro_env_var = { path = "../macro_env_var" }reqwest = { workspace = true }serde = { workspace = true }serde_json = { workspace = true }tokio = { workspace = true }+tracing = { workspace = true }diff --git a/rust/cloud-storage/local_stream_processor/src/main.rs b/rust/cloud-storage/local_stream_processor/src/main.rsindex c707ddec2e..8e3a1ef852 100644--- a/rust/cloud-storage/local_stream_processor/src/main.rs+++ b/rust/cloud-storage/local_stream_processor/src/main.rs@@ -43,10 +43,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {println!();// Configure AWS SDK for local DynamoDB- let config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region(aws_config::Region::new("us-east-1"))- .load()- .await;+ let config = macro_aws_config::get_macro_aws_config().await;let dynamodb_client = aws_sdk_dynamodb::Client::new(&config);let streams_client = aws_sdk_dynamodbstreams::Client::new(&config);diff --git a/rust/cloud-storage/macro_aws_config/Cargo.toml b/rust/cloud-storage/macro_aws_config/Cargo.tomlnew file mode 100644index 0000000000..1bb75c7e86--- /dev/null+++ b/rust/cloud-storage/macro_aws_config/Cargo.toml@@ -0,0 +1,12 @@+[package]+edition = "2024"+name = "macro_aws_config"+publish = false+version = "0.1.0"++[dependencies]+aws-config = { workspace = true }+macro_env = { path = "../macro_env" }+macro_env_var = { path = "../macro_env_var" }+thiserror = { workspace = true }+tracing = { workspace = true }diff --git a/rust/cloud-storage/macro_aws_config/src/lib.rs b/rust/cloud-storage/macro_aws_config/src/lib.rsnew file mode 100644index 0000000000..5cc1601f80--- /dev/null+++ b/rust/cloud-storage/macro_aws_config/src/lib.rs@@ -0,0 +1,31 @@+#![deny(missing_docs)]++//! This crate creates a standard way to make AWS configs.++pub use aws_config::SdkConfig;+use macro_env_var::maybe_env_var;++maybe_env_var! {+ #[derive(Clone)]+ pub struct LocalAwsUrl;+}++/// Creates a aws_config to use.+/// If you provide `LOCAL_AWS_URL` environment variable we create a local aws+/// config with test credentials.+/// Otherwise we load normally.+pub async fn get_macro_aws_config() -> aws_config::SdkConfig {+ if let Some(local_aws_url) = LocalAwsUrl::new() {+ aws_config::defaults(aws_config::BehaviorVersion::latest())+ .region("us-east-1")+ .test_credentials()+ .endpoint_url(local_aws_url.as_ref())+ .load()+ .await+ } else {+ aws_config::defaults(aws_config::BehaviorVersion::latest())+ .region("us-east-1")+ .load()+ .await+ }+}diff --git a/rust/cloud-storage/macro_env_var/src/lib.rs b/rust/cloud-storage/macro_env_var/src/lib.rsindex 160b7a63f7..176975a3a6 100644--- a/rust/cloud-storage/macro_env_var/src/lib.rs+++ b/rust/cloud-storage/macro_env_var/src/lib.rs@@ -28,6 +28,18 @@ mod testing_harness {.map_err(|err| VarNameErr { var_name: s, err })}+ pub fn maybe_read_env(s: &'static str) -> Option<String> {+ let cur_getter = MOCK_VAR_GETTER.replace(None);+ match cur_getter {+ Some(mock) => {+ let out = mock(s).ok();+ MOCK_VAR_GETTER.replace(Some(mock));+ out+ }+ None => std::env::var(s).ok(),+ }+ }+pub(crate) fn with_mock_env<F, Cb, U>(f: F, cb: Cb) -> UwhereF: Fn(&'static str) -> Result<String, std::env::VarError> + 'static,@@ -40,6 +52,8 @@ mod testing_harness {}}+#[cfg(test)]+pub use testing_harness::maybe_read_env;#[cfg(test)]pub use testing_harness::read_env;@@ -48,6 +62,12 @@ pub fn read_env(s: &'static str) -> Result<String, VarNameErr> {std::env::var(s).map_err(|err| VarNameErr { var_name: s, err })}+/// Read an environment variable, returning `None` if it is not present.+#[cfg(not(test))]+pub fn maybe_read_env(s: &'static str) -> Option<String> {+ std::env::var(s).ok()+}+/// The type of error that is produced by this crate#[derive(Debug, Error)]#[error("An error occurred while reading envvar: {var_name}. Err: {err}")]@@ -217,3 +237,159 @@ macro_rules! env_var {}};}++/// A macro for defining optional environment variables that return `Option` instead of `Result`.+///+/// Use this when an environment variable is optional and its absence is expected behavior,+/// not an error condition.+///+/// # Example+///+/// ```+/// maybe_env_var! {+/// pub struct OptionalApiKey;+/// }+///+/// // Returns None if OPTIONAL_API_KEY is not set+/// let key: Option<OptionalApiKey> = OptionalApiKey::new();+/// ```+#[macro_export]+macro_rules! maybe_env_var {+ (+ $(#[$attr:meta])*+ $v:vis struct $n:ident;+ ) => {+ $crate::paste::paste! {+ #[doc = "struct which represents the optional `" $n:snake:upper "` environment variable.+ This returns `Option<Self>` when the variable may or may not be present.+ See [`" $n "`::new] for usage methods"]+ $(#[$attr])*+ $v enum $n {+ #[doc = "This environment var is allocated and read at runtime"]+ Runtime(std::sync::Arc<str>),+ #[doc = "This environment var was present at compile time. It may or may not currently exist at runtime."]+ Comptime(&'static str)+ }++ impl $n {+ #[doc = "Attempt to create a new instance of [Self] by reading `" $n:snake:upper "` from the environment variables.+ Returns `None` if the variable is not set."]+ #[allow(dead_code)]+ $v fn new() -> Option<Self> {+ let res = $crate::maybe_read_env($crate::paste::paste! { stringify!([<$n:snake:upper>]) })?;+ Some(Self::Runtime(std::sync::Arc::from(res)))+ }++ #[doc = "Returns the value at compile time if present, otherwise `None`"]+ #[allow(dead_code)]+ $v const fn new_comptime() -> Option<Self> {+ match std::option_env!($crate::paste::paste! { stringify!([<$n:snake:upper>]) }) {+ Some(val) => Some(Self::Comptime(val)),+ None => None,+ }+ }++ #[doc = "Function used for testing purposes. Allows the caller to create a new Self via a static str"]+ #[cfg(test)]+ #[allow(dead_code)]+ $v const fn new_testing(s: &'static str) -> Self {+ Self::Comptime(s)+ }++ #[allow(dead_code)]+ #[doc = "Get a reference to the internal [std::sync::Arc] if this is a runtime allocated env var"]+ $v fn runtime_inner(&self) -> Option<&std::sync::Arc<str>> {+ match self {+ Self::Runtime(i) => Some(i),+ Self::Comptime(_) => None+ }+ }++ #[allow(dead_code)]+ #[doc = "Get a reference to the static string slice that was present at compile time"]+ $v fn comptime_inner(&self) -> Option<&'static str> {+ match self {+ Self::Comptime(i) => Some(i),+ Self::Runtime(_) => None+ }+ }++ #[allow(dead_code)]+ #[doc = "Returns an Arc<str> of the contained value"]+ $v fn as_arc(&self) -> std::sync::Arc<str> {+ match self {+ Self::Comptime(i) => std::sync::Arc::from(*i),+ Self::Runtime(i) => i.clone()+ }+ }+ }++ impl std::ops::Deref for $n {+ type Target = str;++ fn deref(&self) -> &Self::Target {+ match self {+ Self::Runtime(i) => &*i,+ Self::Comptime(i) => i+ }+ }+ }++ impl std::convert::AsRef<str> for $n {+ fn as_ref(&self) -> &str {+ match self {+ Self::Runtime(i) => &*i,+ Self::Comptime(i) => i+ }+ }+ }+ }+ };+ (+ $(#[$attr:meta])*+ $v:vis struct $n:ident {+ $(+ $(#[$field_attr:meta])*+ $field_vis:vis $field_name:ident+ ),* $(,)?+ }+ ) => {+ $crate::paste::paste! {+ $(+ $crate::maybe_env_var!(+ $(#[$field_attr])*+ $field_vis struct $field_name;+ );+ )*++ $(#[$attr])*+ pub struct $n {+ $(+ pub [<$field_name:snake>]: Option<$field_name>,+ )*+ }++ impl $n {+ #[doc = "Create a new instance of self with all the internal env vals retrieved. Each field is `Option<T>` since values may not be set."]+ #[allow(dead_code)]+ $v fn new() -> Self {+ Self {+ $(+ [<$field_name:snake>]: $field_name::new(),+ )*+ }+ }++ #[doc = "Create a new instance of self with all the internal env vals set at compile time. Each field is `Option<T>`."]+ #[allow(dead_code)]+ $v const fn new_comptime() -> Self {+ Self {+ $(+ [<$field_name:snake>]: $field_name::new_comptime(),+ )*+ }+ }+ }+ }+ };+}diff --git a/rust/cloud-storage/macro_env_var/src/tests.rs b/rust/cloud-storage/macro_env_var/src/tests.rsindex b129db8b14..c87e274cc7 100644--- a/rust/cloud-storage/macro_env_var/src/tests.rs+++ b/rust/cloud-storage/macro_env_var/src/tests.rs@@ -82,3 +82,86 @@ fn test_struct_with_fields_mock() {fn it_should_panic() {Config::unwrap_new();}++// Tests for maybe_env_var! macro++maybe_env_var! {+ #[derive(Debug, Clone)]+ pub struct MaybeTestVar;+}++#[test]+fn maybe_env_var_returns_none_when_not_set() {+ let result = MaybeTestVar::new();+ assert!(result.is_none());+}++fn mock_maybe_test_var(k: &'static str) -> Result<String, std::env::VarError> {+ (k == "MAYBE_TEST_VAR")+ .then(|| "optional_value".to_string())+ .ok_or(std::env::VarError::NotPresent)+}++#[test]+fn maybe_env_var_returns_some_when_set() {+ let v = with_mock_env(mock_maybe_test_var, MaybeTestVar::new);+ assert!(v.is_some());+ assert_eq!(&*v.unwrap(), "optional_value");+}++#[test]+fn maybe_env_var_can_be_arced() {+ let v = with_mock_env(mock_maybe_test_var, || MaybeTestVar::new().unwrap());+ let next = v.runtime_inner().unwrap().clone();+ let third = next.clone();+ assert_eq!(Arc::strong_count(&third), 3);+}++maybe_env_var! {+ #[derive(Debug, Clone)]+ pub struct MaybeConfig {+ #[derive(Debug, Clone)]+ pub MaybeDbUrl,+ #[derive(Debug, Clone)]+ pub MaybeApiSecret,+ }+}++#[test]+fn maybe_struct_with_fields_all_none() {+ let config = MaybeConfig::new();+ assert!(config.maybe_db_url.is_none());+ assert!(config.maybe_api_secret.is_none());+}++fn mock_partial_config(k: &'static str) -> Result<String, std::env::VarError> {+ match k {+ "MAYBE_DB_URL" => Ok("postgres://localhost/test".to_string()),+ _ => Err(std::env::VarError::NotPresent),+ }+}++#[test]+fn maybe_struct_with_fields_partial() {+ let config = with_mock_env(mock_partial_config, MaybeConfig::new);+ assert!(config.maybe_db_url.is_some());+ assert_eq!(&*config.maybe_db_url.unwrap(), "postgres://localhost/test");+ assert!(config.maybe_api_secret.is_none());+}++fn mock_full_config(k: &'static str) -> Result<String, std::env::VarError> {+ match k {+ "MAYBE_DB_URL" => Ok("postgres://localhost/test".to_string()),+ "MAYBE_API_SECRET" => Ok("secret456".to_string()),+ _ => Err(std::env::VarError::NotPresent),+ }+}++#[test]+fn maybe_struct_with_fields_all_set() {+ let config = with_mock_env(mock_full_config, MaybeConfig::new);+ assert!(config.maybe_db_url.is_some());+ assert!(config.maybe_api_secret.is_some());+ assert_eq!(&*config.maybe_db_url.unwrap(), "postgres://localhost/test");+ assert_eq!(&*config.maybe_api_secret.unwrap(), "secret456");+}diff --git a/rust/cloud-storage/macro_notify/Cargo.toml b/rust/cloud-storage/macro_notify/Cargo.tomlindex 885f3b60e9..dbd329204b 100644--- a/rust/cloud-storage/macro_notify/Cargo.toml+++ b/rust/cloud-storage/macro_notify/Cargo.toml@@ -10,8 +10,8 @@ local_queue = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }macro_uuid = { path = "../macro_uuid" }model = { path = "../model" }model_notifications = { path = "../model_notifications" }diff --git a/rust/cloud-storage/macro_notify/src/lib.rs b/rust/cloud-storage/macro_notify/src/lib.rsindex 3368996ac4..45db77e601 100644--- a/rust/cloud-storage/macro_notify/src/lib.rs+++ b/rust/cloud-storage/macro_notify/src/lib.rs@@ -26,18 +26,7 @@ pub struct MacroNotifyClient {impl MacroNotifyClient {pub async fn new(notification_queue: String, service: String) -> Self {- let config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(¬ification_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };+ let config = macro_aws_config::get_macro_aws_config().await;Self {inner: aws_sdk_sqs::Client::new(&config),diff --git a/rust/cloud-storage/notification_service/Cargo.toml b/rust/cloud-storage/notification_service/Cargo.tomlindex 585812c022..3d5b0392e6 100644--- a/rust/cloud-storage/notification_service/Cargo.toml+++ b/rust/cloud-storage/notification_service/Cargo.toml@@ -35,7 +35,6 @@ send_email_notifications = ["notification_worker"][dependencies]anyhow = { workspace = true }authentication_service_client = { path = "../authentication_service_client" }-aws-config = { workspace = true }aws-sdk-secretsmanager = { workspace = true }aws-sdk-sesv2 = { workspace = true }aws-sdk-sns = { workspace = true }@@ -53,6 +52,7 @@ macro_cache_client = { path = "../macro_cache_client", default-features = false,"notification_rate_limit",] }macro_cors = { path = "../macro_cors" }+macro_aws_config = { path = "../macro_aws_config" }macro_entrypoint = { path = "../macro_entrypoint" }macro_env = { path = "../macro_env", features = ["frontend_url"] }macro_middleware = { path = "../macro_middleware", default-features = false, features = [diff --git a/rust/cloud-storage/notification_service/examples/send_push_notification.rs b/rust/cloud-storage/notification_service/examples/send_push_notification.rsindex 9792f770a3..38d05cde55 100644--- a/rust/cloud-storage/notification_service/examples/send_push_notification.rs+++ b/rust/cloud-storage/notification_service/examples/send_push_notification.rs@@ -10,10 +10,7 @@ use std::collections::HashMap;async fn main() -> anyhow::Result<()> {MacroEntrypoint::default().init();- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let sns_client = sns_client::SNS::new(aws_sdk_sns::Client::new(&aws_config));diff --git a/rust/cloud-storage/notification_service/src/main.rs b/rust/cloud-storage/notification_service/src/main.rsindex f8b3a5b26b..be18516128 100644--- a/rust/cloud-storage/notification_service/src/main.rs+++ b/rust/cloud-storage/notification_service/src/main.rs@@ -49,13 +49,11 @@ pub async fn main() -> anyhow::Result<()> {"initialized db connection");- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let aws_config = macro_aws_config::get_macro_aws_config().await;++ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(&aws_config),+ );let internal_secret_key = secretsmanager_client.get_maybe_secret_value(config.environment, InternalApiSecretKey::new()?)@@ -71,47 +69,15 @@ pub async fn main() -> anyhow::Result<()> {config.connection_gateway_url.clone(),);- let notification_queue_aws_config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&config.notification_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };-- let push_delivery_queue_aws_config = if cfg!(feature = "local_queue") {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .endpoint_url(&config.push_notification_event_handler_queue)- .load()- .await- } else {- aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await- };-- // Normal config for non-local stack items- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;-let notification_worker = sqs_worker::SQSWorker::new(- aws_sdk_sqs::Client::new(¬ification_queue_aws_config),+ aws_sdk_sqs::Client::new(&aws_config),config.notification_queue.clone(),config.notification_queue_max_messages,config.notification_queue_wait_time_seconds,);let push_notification_event_handler_worker = sqs_worker::SQSWorker::new(- aws_sdk_sqs::Client::new(&push_delivery_queue_aws_config),+ aws_sdk_sqs::Client::new(&aws_config),config.push_notification_event_handler_queue.clone(),config.notification_queue_max_messages,config.notification_queue_wait_time_seconds,diff --git a/rust/cloud-storage/notification_service/src/notification_email_poller_worker.rs b/rust/cloud-storage/notification_service/src/notification_email_poller_worker.rsindex a935b539dc..451dcb4e82 100644--- a/rust/cloud-storage/notification_service/src/notification_email_poller_worker.rs+++ b/rust/cloud-storage/notification_service/src/notification_email_poller_worker.rs@@ -45,11 +45,7 @@ pub async fn main() -> anyhow::Result<()> {"initialized db connection");- // Normal config for non-local stack items- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let ses_client = ses_client::Ses::new(aws_sdk_sesv2::Client::new(&aws_config),diff --git a/rust/cloud-storage/organization_retention_handler/Cargo.toml b/rust/cloud-storage/organization_retention_handler/Cargo.tomlindex 3445215e67..e01b86f8d1 100644--- a/rust/cloud-storage/organization_retention_handler/Cargo.toml+++ b/rust/cloud-storage/organization_retention_handler/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["sqs"] }lambda_runtime = { workspace = true }macro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/organization_retention_handler/src/main.rs b/rust/cloud-storage/organization_retention_handler/src/main.rsindex e9db87ffbe..6c3faece5d 100644--- a/rust/cloud-storage/organization_retention_handler/src/main.rs+++ b/rust/cloud-storage/organization_retention_handler/src/main.rs@@ -32,10 +32,7 @@ async fn main() -> Result<(), Error> {std::env::var("CHAT_DELETE_QUEUE").context("CHAT_DELETE_QUEUE must be provided")?;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).document_delete_queue(&document_delete_queue).chat_delete_queue(&chat_delete_queue);diff --git a/rust/cloud-storage/organization_retention_trigger/Cargo.toml b/rust/cloud-storage/organization_retention_trigger/Cargo.tomlindex 64c40c80d6..f8f3d01dbf 100644--- a/rust/cloud-storage/organization_retention_trigger/Cargo.toml+++ b/rust/cloud-storage/organization_retention_trigger/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["eventbridge"] }lambda_runtime = { workspace = true }macro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/organization_retention_trigger/src/main.rs b/rust/cloud-storage/organization_retention_trigger/src/main.rsindex 39ce2bab6f..ed31316ff9 100644--- a/rust/cloud-storage/organization_retention_trigger/src/main.rs+++ b/rust/cloud-storage/organization_retention_trigger/src/main.rs@@ -49,10 +49,7 @@ async fn main() -> Result<(), Error> {let organization_retention_queue = std::env::var("ORGANIZATION_RETENTION_QUEUE").context("ORGANIZATION_RETENTION_QUEUE must be set")?;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).organization_retention_queue(&organization_retention_queue);diff --git a/rust/cloud-storage/properties_service/Cargo.toml b/rust/cloud-storage/properties_service/Cargo.tomlindex 3799cde53f..fe17546bf9 100644--- a/rust/cloud-storage/properties_service/Cargo.toml+++ b/rust/cloud-storage/properties_service/Cargo.toml@@ -21,8 +21,8 @@ tree_trace = [][dependencies]anyhow = { workspace = true }async-trait = { workspace = true }-aws-config = { workspace = true }aws-sdk-secretsmanager = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }axum = { workspace = true, features = ["tower-log", "ws"] }chrono = { workspace = true }comms_service_client = { path = "../comms_service_client" }diff --git a/rust/cloud-storage/properties_service/src/main.rs b/rust/cloud-storage/properties_service/src/main.rsindex 5823f8ed46..4ef6c8b825 100644--- a/rust/cloud-storage/properties_service/src/main.rs+++ b/rust/cloud-storage/properties_service/src/main.rs@@ -40,13 +40,9 @@ async fn main() -> anyhow::Result<()> {"initialized macrodb connection");- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(¯o_aws_config::get_macro_aws_config().await),+ );tracing::info!("initialized secretsmanager client");let jwt_args =diff --git a/rust/cloud-storage/search_processing_service/Cargo.toml b/rust/cloud-storage/search_processing_service/Cargo.tomlindex bc0b69298d..35192d387d 100644--- a/rust/cloud-storage/search_processing_service/Cargo.toml+++ b/rust/cloud-storage/search_processing_service/Cargo.toml@@ -22,7 +22,6 @@ required-features = ["processing", "service"][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-s3 = { workspace = true }aws-sdk-secretsmanager = { workspace = true }aws-sdk-sqs = { workspace = true }@@ -35,6 +34,7 @@ email_service_client = { path = "../email_service_client" }futures = { workspace = true }http-body-util = { workspace = true }lexical_client = { path = "../lexical_client" }+macro_aws_config = { path = "../macro_aws_config" }macro_cors = { path = "../macro_cors" }macro_db_client = { path = "../macro_db_client", optional = true } # Make this optionalmacro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/search_processing_service/src/bin/backfill_chat.rs b/rust/cloud-storage/search_processing_service/src/bin/backfill_chat.rsindex d74efbc44b..264c5f18cf 100644--- a/rust/cloud-storage/search_processing_service/src/bin/backfill_chat.rs+++ b/rust/cloud-storage/search_processing_service/src/bin/backfill_chat.rs@@ -22,10 +22,7 @@ async fn main() -> anyhow::Result<()> {let search_event_queue =std::env::var("SEARCH_EVENT_QUEUE").context("SEARCH_EVENT_QUEUE not set")?;- let queue_aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let queue_aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&queue_aws_config)).search_event_queue(&search_event_queue);diff --git a/rust/cloud-storage/search_processing_service/src/main.rs b/rust/cloud-storage/search_processing_service/src/main.rsindex 882d937a42..dbc9980d8c 100644--- a/rust/cloud-storage/search_processing_service/src/main.rs+++ b/rust/cloud-storage/search_processing_service/src/main.rs@@ -32,10 +32,7 @@ async fn main() -> anyhow::Result<()> {let config = Config::from_env().context("expected to be able to generate config")?;tracing::trace!("initialized config");- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(&aws_config)).search_event_queue(&config.search_event_queue);diff --git a/rust/cloud-storage/search_service/Cargo.toml b/rust/cloud-storage/search_service/Cargo.tomlindex c156151f0e..4cc6d25f7c 100644--- a/rust/cloud-storage/search_service/Cargo.toml+++ b/rust/cloud-storage/search_service/Cargo.toml@@ -14,8 +14,8 @@ path = "src/openapi.rs"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-secretsmanager = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }axum = { workspace = true }chrono = { workspace = true }comms_db_client = { path = "../comms_db_client" }diff --git a/rust/cloud-storage/search_service/src/main.rs b/rust/cloud-storage/search_service/src/main.rsindex 58e41be710..5ff70fcce2 100644--- a/rust/cloud-storage/search_service/src/main.rs+++ b/rust/cloud-storage/search_service/src/main.rs@@ -20,10 +20,7 @@ async fn main() -> anyhow::Result<()> {let config = Config::from_env().context("expected to be able to generate config")?;tracing::trace!("initialized config");- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;let secretsmanager_client = secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(&aws_config),diff --git a/rust/cloud-storage/search_upload_handler/Cargo.toml b/rust/cloud-storage/search_upload_handler/Cargo.tomlindex 46e56a9eac..d0058daf90 100644--- a/rust/cloud-storage/search_upload_handler/Cargo.toml+++ b/rust/cloud-storage/search_upload_handler/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["eventbridge"] }lambda_runtime = { workspace = true }macro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/search_upload_handler/src/main.rs b/rust/cloud-storage/search_upload_handler/src/main.rsindex 72ebe2cb7f..8a52afc438 100644--- a/rust/cloud-storage/search_upload_handler/src/main.rs+++ b/rust/cloud-storage/search_upload_handler/src/main.rs@@ -17,10 +17,7 @@ async fn main() -> Result<(), Error> {std::env::var("SEARCH_EVENT_QUEUE").context("SEARCH_EVENT_QUEUE must be provided")?;let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,)).search_event_queue(&search_event_queue);diff --git a/rust/cloud-storage/sha_cleanup_worker/Cargo.toml b/rust/cloud-storage/sha_cleanup_worker/Cargo.tomlindex 937bab85fd..194bce10d2 100644--- a/rust/cloud-storage/sha_cleanup_worker/Cargo.toml+++ b/rust/cloud-storage/sha_cleanup_worker/Cargo.toml@@ -10,8 +10,8 @@ redis_client_test = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-s3 = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }futures = { workspace = true }macro_entrypoint = { path = "../macro_entrypoint" }macro_env = { path = "../macro_env" }diff --git a/rust/cloud-storage/sha_cleanup_worker/src/main.rs b/rust/cloud-storage/sha_cleanup_worker/src/main.rsindex a482300283..252d23e8fc 100644--- a/rust/cloud-storage/sha_cleanup_worker/src/main.rs+++ b/rust/cloud-storage/sha_cleanup_worker/src/main.rs@@ -12,12 +12,7 @@ async fn main() -> Result<(), anyhow::Error> {let config = Config::from_env().context("all necessary env vars should be available")?;let s3_client = service::s3::S3::new(- aws_sdk_s3::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ),+ aws_sdk_s3::Client::new(¯o_aws_config::get_macro_aws_config().await),&config.document_storage_bucket,);diff --git a/rust/cloud-storage/static_file_service/Cargo.toml b/rust/cloud-storage/static_file_service/Cargo.tomlindex bd5e75c0fc..3f3c7d88e6 100644--- a/rust/cloud-storage/static_file_service/Cargo.toml+++ b/rust/cloud-storage/static_file_service/Cargo.toml@@ -19,7 +19,6 @@ tree_trace = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-dynamodb = { workspace = true }aws-sdk-s3 = { workspace = true }aws-sdk-secretsmanager = { workspace = true }@@ -27,6 +26,7 @@ aws-sdk-sqs.workspace = trueaxum = { workspace = true, features = ["tower-log", "ws"] }chrono = { workspace = true }macro_auth = { path = "../macro_auth" }+macro_aws_config = { path = "../macro_aws_config" }macro_cors = { path = "../macro_cors" }macro_entrypoint = { path = "../macro_entrypoint" }macro_env = { path = "../macro_env" }diff --git a/rust/cloud-storage/static_file_service/src/api/mod.rs b/rust/cloud-storage/static_file_service/src/api/mod.rsindex c908a1073f..88032ecd90 100644--- a/rust/cloud-storage/static_file_service/src/api/mod.rs+++ b/rust/cloud-storage/static_file_service/src/api/mod.rs@@ -9,7 +9,6 @@ use super::service::dynamodb::client::DynamodbClient;use super::service::s3::client::S3Client;use crate::api::context::AppState;use anyhow::Context;-use aws_config::Region;use axum::Router;use axum::extract::DefaultBodyLimit;use macro_auth::middleware::decode_jwt::JwtValidationArgs;@@ -30,16 +29,10 @@ pub async fn setup_and_serve() -> anyhow::Result<()> {let cors = macro_cors::cors_layer();- let metadata_client = DynamodbClient::new(- Region::from_static("us-east-1"),- config.dynamodb_table.clone(),- )- .await;+ let aws_config = macro_aws_config::get_macro_aws_config().await;++ let metadata_client = DynamodbClient::new(&aws_config, config.dynamodb_table.clone());- let aws_config = aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await;let sqs_client = aws_sdk_sqs::Client::new(&aws_config);let inner_client = aws_sdk_s3::Client::new(&aws_config);let storage_client = S3Client::new(inner_client, config.storage_bucket_name.clone());diff --git a/rust/cloud-storage/static_file_service/src/main.rs b/rust/cloud-storage/static_file_service/src/main.rsindex d656b2d92c..77221cdb8e 100644--- a/rust/cloud-storage/static_file_service/src/main.rs+++ b/rust/cloud-storage/static_file_service/src/main.rs@@ -15,13 +15,10 @@ async fn main() -> anyhow::Result<()> {let config = config::Config::from_env().context("missing environment variables")?;- let secretsmanager_client =- secretsmanager_client::SecretsManager::new(aws_sdk_secretsmanager::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- ));+ let aws_config = macro_aws_config::get_macro_aws_config().await;+ let secretsmanager_client = secretsmanager_client::SecretsManager::new(+ aws_sdk_secretsmanager::Client::new(&aws_config),+ );let internal_api_secret = secretsmanager_client.get_maybe_secret_value(config.environment, InternalApiSecretKey::new()?)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.rsindex b8797b92e4..a6a6b11991 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@@ -5,7 +5,6 @@ use super::model::DeleteError;use super::model::MetadataObject;use super::put_item;use anyhow::{Context, Result, format_err};-use aws_config::Region;use aws_sdk_dynamodb::Client;use aws_sdk_dynamodb::types::AttributeValue;use serde_dynamo::{Item, from_item, to_item};@@ -18,13 +17,9 @@ pub struct DynamodbClient {}impl DynamodbClient {- pub async fn new(region: Region, table: String) -> Self {- let client = Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region(region)- .load()- .await,- );+ /// Create a new DynamodbClient with the given AWS config and table name.+ pub fn new(aws_config: ¯o_aws_config::SdkConfig, table: String) -> Self {+ let client = Client::new(aws_config);DynamodbClient { client, table }}diff --git a/rust/cloud-storage/static_file_service/src/service/dynamodb/put_item.rs b/rust/cloud-storage/static_file_service/src/service/dynamodb/put_item.rsindex 76ffa8789c..9e210c2e09 100644--- a/rust/cloud-storage/static_file_service/src/service/dynamodb/put_item.rs+++ b/rust/cloud-storage/static_file_service/src/service/dynamodb/put_item.rs@@ -28,12 +28,8 @@ mod tests {// Helper function to create a DynamoDB client for testingasync fn create_test_client() -> Result<Client> {- let client = Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,- );+ let aws_config = macro_aws_config::get_macro_aws_config().await;+ let client = Client::new(&aws_config);Ok(client)}diff --git a/rust/cloud-storage/target/lambda/deleted_item_poller/bootstrap.zip b/rust/cloud-storage/target/lambda/deleted_item_poller/bootstrap.zipindex d6364e3001..a1bf4cfb97 100644Binary files a/rust/cloud-storage/target/lambda/deleted_item_poller/bootstrap.zip and b/rust/cloud-storage/target/lambda/deleted_item_poller/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/email_refresh_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/email_refresh_handler/bootstrap.zipindex e4e1b0e567..eb5186f513 100644Binary files a/rust/cloud-storage/target/lambda/email_refresh_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/email_refresh_handler/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/email_scheduled_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/email_scheduled_handler/bootstrap.zipindex 060eb09729..fd09d4e79f 100644Binary files a/rust/cloud-storage/target/lambda/email_scheduled_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/email_scheduled_handler/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/email_sfs_delete_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/email_sfs_delete_handler/bootstrap.zipindex 3f25f0ccaf..d6835a8f31 100644Binary files a/rust/cloud-storage/target/lambda/email_sfs_delete_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/email_sfs_delete_handler/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/organization_retention_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/organization_retention_handler/bootstrap.zipindex 8c88db62a3..674e5a70c6 100644Binary files a/rust/cloud-storage/target/lambda/organization_retention_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/organization_retention_handler/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/organization_retention_trigger/bootstrap.zip b/rust/cloud-storage/target/lambda/organization_retention_trigger/bootstrap.zipindex ee03d2af79..2f061def13 100644Binary files a/rust/cloud-storage/target/lambda/organization_retention_trigger/bootstrap.zip and b/rust/cloud-storage/target/lambda/organization_retention_trigger/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zipindex 8fac72fa8f..9d06895c91 100644Binary files a/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/upload_extractor_lambda_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/upload_extractor_lambda_handler/bootstrap.zipindex 6db8d47202..f4b54ae261 100644Binary files a/rust/cloud-storage/target/lambda/upload_extractor_lambda_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/upload_extractor_lambda_handler/bootstrap.zip differdiff --git a/rust/cloud-storage/target/lambda/upload_extractor_lambda_trigger/bootstrap.zip b/rust/cloud-storage/target/lambda/upload_extractor_lambda_trigger/bootstrap.zipindex 0b0aa5515e..cdb584e0cd 100644Binary files a/rust/cloud-storage/target/lambda/upload_extractor_lambda_trigger/bootstrap.zip and b/rust/cloud-storage/target/lambda/upload_extractor_lambda_trigger/bootstrap.zip differdiff --git a/rust/cloud-storage/upload_extractor_lambda_handler/Cargo.toml b/rust/cloud-storage/upload_extractor_lambda_handler/Cargo.tomlindex c8bae78e74..b38534a369 100644--- a/rust/cloud-storage/upload_extractor_lambda_handler/Cargo.toml+++ b/rust/cloud-storage/upload_extractor_lambda_handler/Cargo.toml@@ -9,7 +9,6 @@ local = [][dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-s3 = { workspace = true }aws-sdk-sqs = { workspace = true }aws_lambda_events = { workspace = true, features = ["sqs"] }@@ -19,6 +18,7 @@ document_storage_service_client = { path = "../document_storage_service_client"dynamodb_client = { path = "../dynamodb_client" }futures = { workspace = true }lambda_runtime = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }macro_entrypoint = { path = "../macro_entrypoint" }model = { path = "../model" }model-entity = { path = "../model-entity" }diff --git a/rust/cloud-storage/upload_extractor_lambda_handler/src/main.rs b/rust/cloud-storage/upload_extractor_lambda_handler/src/main.rsindex 268144d85f..44dd11efcf 100644--- a/rust/cloud-storage/upload_extractor_lambda_handler/src/main.rs+++ b/rust/cloud-storage/upload_extractor_lambda_handler/src/main.rs@@ -1,7 +1,6 @@use anyhow::{Context, Result};-use aws_config::meta::region::RegionProviderChain;use aws_lambda_events::{event::sqs::SqsEvent, sqs::SqsMessage};-use aws_sdk_s3::{Client as S3Client, config::Region, primitives::ByteStream};+use aws_sdk_s3::{Client as S3Client, primitives::ByteStream};use connection_gateway_client::client::ConnectionGatewayClient;use document_storage_service_client::DocumentStorageServiceClient;use dynamodb_client::DynamodbClient;@@ -585,8 +584,7 @@ async fn main() -> Result<(), Error> {let connection_gateway_url =std::env::var("CONNECTION_GATEWAY_URL").context("CONNECTION_GATEWAY_URL must be set")?;- let region_provider = RegionProviderChain::default_provider().or_else(Region::new("us-east-1"));- let config = aws_config::from_env().region(region_provider).load().await;+ let config = macro_aws_config::get_macro_aws_config().await;let s3_client = S3Client::new(&config);let dss_client = DocumentStorageServiceClient::new(internal_api_secret_key.clone(), dss_url);diff --git a/rust/cloud-storage/upload_extractor_lambda_trigger/Cargo.toml b/rust/cloud-storage/upload_extractor_lambda_trigger/Cargo.tomlindex d4763b52ab..5360f39a85 100644--- a/rust/cloud-storage/upload_extractor_lambda_trigger/Cargo.toml+++ b/rust/cloud-storage/upload_extractor_lambda_trigger/Cargo.toml@@ -6,11 +6,11 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-sqs = { workspace = true }aws_lambda_events = { workspace = true, features = ["eventbridge", "s3"] }dynamodb_client = { path = "../dynamodb_client" }lambda_runtime = { workspace = true }+macro_aws_config = { path = "../macro_aws_config" }macro_entrypoint = { path = "../macro_entrypoint" }models_bulk_upload = { path = "../models_bulk_upload" }openssl = { workspace = true }diff --git a/rust/cloud-storage/upload_extractor_lambda_trigger/src/main.rs b/rust/cloud-storage/upload_extractor_lambda_trigger/src/main.rsindex 2d78f98a3a..c32a6fe207 100644--- a/rust/cloud-storage/upload_extractor_lambda_trigger/src/main.rs+++ b/rust/cloud-storage/upload_extractor_lambda_trigger/src/main.rs@@ -1,7 +1,6 @@use std::sync::Arc;use anyhow::Context;-use aws_config::{Region, meta::region::RegionProviderChain};use aws_lambda_events::event::eventbridge::EventBridgeEvent;use dynamodb_client::DynamodbClient;use lambda_runtime::{@@ -100,8 +99,7 @@ async fn main() -> Result<(), Error> {tracing::trace!("initialized env vars");- let region_provider = RegionProviderChain::default_provider().or_else(Region::new("us-east-1"));- let config = aws_config::from_env().region(region_provider).load().await;+ let config = macro_aws_config::get_macro_aws_config().await;let dynamodb_client = DynamodbClient::new(&config, Some(dynamo_table_name.clone()));tracing::trace!("initialized dynamodb client");diff --git a/rust/cloud-storage/worker_trigger/Cargo.toml b/rust/cloud-storage/worker_trigger/Cargo.tomlindex df1d2ec303..69b50e4b3f 100644--- a/rust/cloud-storage/worker_trigger/Cargo.toml+++ b/rust/cloud-storage/worker_trigger/Cargo.toml@@ -6,8 +6,8 @@ version = "0.1.0"[dependencies]anyhow = { workspace = true }-aws-config = { workspace = true }aws-sdk-ecs = "1.104.0"+macro_aws_config = { path = "../macro_aws_config" }aws_lambda_events = { workspace = true, features = ["eventbridge"] }lambda_runtime = { workspace = true }macro_entrypoint = { path = "../macro_entrypoint" }diff --git a/rust/cloud-storage/worker_trigger/src/main.rs b/rust/cloud-storage/worker_trigger/src/main.rsindex febb4f682f..3f22563a5d 100644--- a/rust/cloud-storage/worker_trigger/src/main.rs+++ b/rust/cloud-storage/worker_trigger/src/main.rs@@ -36,10 +36,7 @@ async fn main() -> Result<(), Error> {tracing::trace!("initialized config");let ecs_client = service::ecs::ECSClient::new(aws_sdk_ecs::Client::new(- &aws_config::defaults(aws_config::BehaviorVersion::latest())- .region("us-east-1")- .load()- .await,+ ¯o_aws_config::get_macro_aws_config().await,));tracing::trace!("initialized ecs client");