Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

307
Views
KMS permissions for encrypted CloudWatch LogGroups with AWS Systems Session Manager

I've set up a CMK (Custom Managed Key) to encrypt LogGroups with AWS Systems Session Manager:

  1. First, permissions for "key administrators" and "key users/roles" are added in the KMS console.

  2. Next, the CMK is attached in AWS Systems Manager Session Manager Preferences to the LogGroup as shown in this image:

enter image description here

Error:

The specified KMS key does not exist or is not allowed to be used with LogGroup 'arn:aws:logs:my_region:my_account_id:log-group:/SSM'

The key must exist because it's used to encrypt the Sessions and is just not decrypting LogGroups properly, but it is linked to the LogGroup and the user has permission. What gives?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I tried to replicate your issue.

My session manger settings:

enter image description here

The CloudWatch log group has been encrypted using CLI:

{
    "logGroups": [
        {
            "logGroupName": "SSM",
            "creationTime": 1593579430258,
            "metricFilterCount": 0,
            "arn": "arn:aws:logs:us-east-1:xxxxx:log-group:SSM:*",
            "storedBytes": 0,
            "kmsKeyId": "arn:aws:kms:us-east-1:xxxxxxxxx:key/xxxx-9500-xxxxx"
        }
    ]
}

After launching the session manger I can get confirmation that it is encrypted:

enter image description here

Based on this verification, the only thing required to make it work was setting KMS key policies. I added the following to my KMS (SSMRole is instance role, the other entries should be self-explenatory):

{
    "Effect": "Allow",
    "Principal": {
        "Service": "logs.us-east-1.amazonaws.com"
    },
    "Action": [
        "kms:Encrypt*",
        "kms:Decrypt*",
        "kms:ReEncrypt*",
        "kms:GenerateDataKey*",
        "kms:Describe*"
    ],
    "Resource": "*",
    "Condition": {
        "ArnLike": {
            "kms:EncryptionContext:aws:logs:arn": "arn:aws:logs:us-east-1:xxxxx:log-group:SSM"
        }
    }
},    
{
    "Effect": "Allow",
    "Principal": {
        "Service": "ssm.amazonaws.com"
    },
    "Action": [
        "kms:Encrypt*",
        "kms:Decrypt*",
        "kms:ReEncrypt*",
        "kms:GenerateDataKey*",
        "kms:Describe*"
    ],
    "Resource": "*"            
}, 
{
    "Effect": "Allow",    
    "Action": [
        "kms:Encrypt*",
        "kms:Decrypt*",
        "kms:ReEncrypt*",
        "kms:GenerateDataKey*",
        "kms:Describe*"
    ],
    "Resource": "*",
    "Principal": {
        "AWS": "arn:aws:iam::xxxxx:role/SSMRole"
    }      
}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!