Skip to content

feat(kms): import an Alias by name#8299

Merged
mergify[bot] merged 4 commits intoaws:masterfrom
njlynch:njlynch/issue5953
Jun 17, 2020
Merged

feat(kms): import an Alias by name#8299
mergify[bot] merged 4 commits intoaws:masterfrom
njlynch:njlynch/issue5953

Conversation

@njlynch
Copy link
Copy Markdown
Contributor

@njlynch njlynch commented Jun 1, 2020

Supports importing an Alias by alias name only, without the underlying reference
to the Key ARN. Useful in scenarios where only the alias is needed in a
reference by a Construct.

fixes #5953


Tested via a simple repro script:

    const key = kms.Alias.fromAliasName(this, 'myKey', 'alias/myTestKey');
    new cloudtrail.Trail(this, 'CloudTrail', {
        sendToCloudWatchLogs: true,
        kmsKey: key
    });

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Supports importing an Alias by alias name only, without the underlying reference
to the Key ARN. Useful in scenarios where only the alias is needed to be
referenced by a Construct.
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 5305e36
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@skinny85 skinny85 self-assigned this Jun 1, 2020
Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I'd like to go a step further in making this more usable 🙂.

@rix0rrr rix0rrr changed the title feat(kms): support importing an Alias by name feat(kms): import an Alias by name Jun 9, 2020
@mergify mergify bot dismissed skinny85’s stale review June 9, 2020 18:14

Pull request has been modified.

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 70b4b76
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: da23728
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 10, 2020
Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, thanks a lot @njlynch !

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jun 16, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 761af94
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jun 17, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 4611e69 into aws:master Jun 17, 2020
@Aarbel
Copy link
Copy Markdown

Aarbel commented Apr 4, 2023

@njlynch

const key = kms.Alias.fromAliasName(this, 'myKey', 'alias/myTestKey');

By myKey you mean KMS' keyId or key ARN ?

image

@skinny85
Copy link
Copy Markdown
Contributor

skinny85 commented Apr 5, 2023

Pretty sure Nick meant 'myKey' as a string - a resource identifier.

@Aarbel
Copy link
Copy Markdown

Aarbel commented Apr 5, 2023

Pretty sure Nick meant 'myKey' as a string - a resource identifier.

Thanks @skinny85, i name it rdsKmsKeyForPerformanceInsights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KMS - Ability to import an AWS managed key by its alias

5 participants