简体   繁体   English

无服务器框架模板中的跨区域 Secrets Manager 访问

[英]Cross-Region Secrets Manager Access in Serverless Framework Template

I'm accessing Secrets Manager in my serverless.yml via我正在通过 serverless.yml 访问 Secrets Manager

${ssm:/aws/reference/secretsmanager/<path-to-secret>~true}

which works out nicely.效果很好。

Problem is, I'm keeping all my secrets in a single region & now I'm trying to add another region (= stage in serverless), but I don't know how to reference secrets from my main region.问题是,我将所有秘密保存在一个区域中,现在我正在尝试添加另一个区域(= 无服务器阶段),但我不知道如何从我的主要区域引用秘密。 To keep costs low, I don't want to replicate my secrets to the secondary regions though.为了保持低成本,我不想将我的秘密复制到次要区域。

Is there any way to achieve this without some pre-scripting magic but solely using Serverless?有没有什么方法可以在没有预先编写脚本的情况下仅使用无服务器来实现这一点?

Based on the docs , the following should work:根据文档,以下应该有效:

${ssm.<region-name>:/aws/reference/secretsmanager/<path-to-secret>~true}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM