KMS

KMS


Blog

Bug-Byte #5: Unlocking AWS S3: Overcome Access Denied with Insider Tips

Troubleshooting access to S3 buckets in AWS can be frustrating at times, especially given the generic nature of AWS Access Denied errors. These errors often stem from misconfigured policies on the S3 bucket or IAM principal. However, I have encountered a few more exotic cases in the field.

On the rare occasion that the issue is not policy-related, there are three places that I like to check:

  1. Does the bucket have server-side encryption (SSE) configured with a customer-managed KMS Key (CMK)?
  2. Does the traffic to the S3 bucket pass through any VPC S3 endpoints?
  3. Are you trying to configure a Public S3 bucket when all public access is blocked at the account level?

Server-Side Encryption

If an S3 bucket is configured with SSE and is using a CMK, make sure that the principals who require access to the bucket have been granted the ability to use the following actions in the KMS key policy:

Mar 11, 2024
Blog

Improve the security of your AWS account

As more organizations migrate their infrastructure to the cloud, security in the cloud has become a top priority. One of the most common security issues in AWS is misconfiguration, which can leave organizations vulnerable to attacks and data breaches.

In this article, we will discuss the most common security misconfigurations we find in AWS accounts. Understanding and addressing these misconfigurations can help ensure that your AWS environment is secure and protected from potential threats.

Mar 21, 2023
Blog

Bug-Byte 2: KMS Key does not exist

In the same vein as Bug Byte 1, here is another encryption permission issue you may encounter while working with AWS Key Management Service (KMS). Have you seen an error like the one below in CloudFormation while creating a KMS-encrypted AWS resource?

    
        
"The specified KMS key does not exist or is not allowed to be used" 

    

If so, there’s a chance that the key policy assigned to your Customer Managed Key (CMK) could be the culprit. It is possible that the service you are trying to encrypt does not have access to the KMS key in question.

Nov 5, 2022
Blog

Bug-Byte 1: AWS EC2 Auto Scaling Group Instances Fails on Launch

Have you ever encountered an obscure error like the one below in the AWS Autoscaling Console?

    
        
Client.InternalError: Client error on launch.

    

Often vague errors like these can be traced back to encryption-related permissions issues. AWS intentionally obfuscates Key Management Service (KMS) errors to prevent malicious actors from gaining information from error messages, which can sometimes make debugging a frustrating experience.

If the Amazon Machine Image (AMI) you are using for your Auto Scaling Group is encrypted with a KMS key, and you are seeing this issue in your Autoscaling Group, check the policy on your KMS key. It should allow access to the KMS key from the AutoScaling Service Role, like so:

Oct 26, 2022
Your project next

Have a use case in mind? Let's talk it through.

Send a paragraph about what you're trying to do on AWS. I'll come back with how I'd approach it, or a pointer to someone better suited.