https://pulumi.com logo
#typescript
Title
# typescript
c

careful-architect-87653

11/08/2020, 2:22 PM
Hey everyone, I have little trouble setting up config secrets. I'm getting
Secret outputs cannot be captured by a closure.
error. AFAIK, closure here means the code that gets serialized into Lambda? How am I supposed to access config secrets?
c

clever-sunset-76585

11/08/2020, 7:00 PM
Instead of using the stack config secret directly inside your Lambda, you should create an AWS Secrets Manager resource and put the secret in there. Then, in your Lambda you can use the AWS SDK object to construct a Secrets Manager client in order to retrieve the secret. You could also store the secret in AWS Systems Manager (SSM). There is a price difference between the two. You may also want to review if the config property in question really needs to be a secret before you do the additional work.
👍 1
c

careful-architect-87653

11/10/2020, 9:31 AM
Thanks 🙂