question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

secret from SecretsManager not resolved correctly

See original GitHub issue

the secret doesn’t seem to be correctly resolved when used in outputs

Reproduction Steps

const secret = secretsManager.Secret.fromSecretArn(
  this,
  'Secrets',
  'arn:aws:secretsmanager:us-east-1:xxx:secret:yyy-secrets-zzz',
);
new cdk.CfnOutput(this, 'testoutput', {
  value: secret.secretValueFromJson('abcdef').toString(),
});

produces the following output:

app.testoutput = {{resolve:secretsmanager:arn:aws:secretsmanager:us-east-1:xxx:secret:yyy-secrets-zzz:SecretString:abcdef::}}

instead of the actual resolved secret

Environment

using aws-cdk v1.8.0


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
itajajacommented, Nov 19, 2019

that makes sense. my actual use case is to use a secret from secretsManager as a k8s secret using aws-cdk’s addResource functionality. in that case as well the secret is not resolved. what would be a good workflow there?

1reaction
adrialucena-seatcommented, Jun 15, 2020

Same use case here. It seems something related to addResource, that doesn’t resolve the value. But using Secret.fromSecretArn to create an environment variable in an ECS task definition works. Any workarround for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve Secrets Manager secret access errors after updating ...
I attempted to retrieve or access an AWS Secrets Manager secret, ... This version of secret is not encrypted with the current KMS...
Read more >
GetSecretValue operation is not authorized error with AWS ...
The issue was that the IAM user that I was using did not have he SecretsManager execution policy attached.
Read more >
How to manage any kind of secret with AWS Secrets Manager
Setting up Secrets Manager for a non-RDS database is less trivial as ... Be sure to properly look into the service and keep...
Read more >
AWS Secrets Manager — Boto3 Docs 1.17.104 documentation
The secret could be created using either the Secrets Manager console or the CLI/SDK ... print("The requested secret " + secret_name + "...
Read more >
Best practice rules for AWS Secrets Manager - Medium
Ensure that Amazon Secrets Manager's automatic rotation interval is properly configured. 2. Secrets Manager In Use. Ensure that AWS Secrets Manager is in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found