(secretsmanager): Access secret string stored in secret manager from CDK
See original GitHub issueI am storing the Codestar connection string for Bitbucket in Secret manager. How can I retrieve it in the CDK app:
I am trying with:
// Get Bitbucket Connection String
const bitbucketConnectionString = Secret.fromSecretCompleteArn(this, "bitbucketConnectionString", "arn:aws:secretsmanager:us-west-2:1000000000:secret:BitbucketCloudConnection-abcdef0");
// SourceAction
const sourceAction = new BitBucketSourceAction({
actionName: 'BitbucketSource',
owner: 'abc',
repo: repoName,
output: sourceOutputArtifact,
connectionArn: bitbucketConnectionString,
})
bitbucketConnectionString
is not a string though.
-
How do I access the secret value which is actually a connectionString stored in Secret Manager.
-
What is the right way to replace region and accountId with Pseudo variables in the connection string;
arn:aws:secretsmanager:us-west-2:1000000000㊙️BitbucketCloudConnection-abcdef0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
aws-cdk/aws-secretsmanager module - AWS Documentation
Secrets imported by name should use the short-form of the name (without the SecretsManager-provided suffx); the secret name must exist in the same...
Read more >Access string stored in secret manager from CDK
I am storing the Codestar connection string for Bitbucket in Secret manager. How can I retrieve it in the CDK app: I am...
Read more >Pattern: Secure AWS secret handling with TypeScript CDK
AWS Secrets Manager. Allows you to store, rotate, version and retrieve secrets. It uses KMS under the covers and also applies encryption at ......
Read more >Store and Rotate API Keys with AWS Secrets Manager
The AWS console only supports string values containing plaintext or JSON formatted key-value pairs. Binary secrets must be managed via the API. Secret...
Read more >Securely Use Secrets In Your AWS CDK Deployed Lambda ...
I will be using Python flavored AWS CDK to deploy a Lambda function which has permissions to access a secret stored in Secrets...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just like the example in the README in core.
SecretValue
is a class from@aws-cdk/core
.⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.