This is a glossary of all the common issues in AWS - AWS CDK
  • 08-Jan-2023
Lightrun Team
Author Lightrun Team
This is a glossary of all the common issues in AWS - AWS CDK

Troubleshooting Common Issues in AWS – AWS CDK

Lightrun Team
Lightrun Team

Project Description


Amazon Web Services (AWS) Cloud Development Kit (CDK) is a software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. The CDK uses familiar programming languages, including TypeScript, JavaScript, Python, C#, and Java, to define cloud resources as code and deploy them using the AWS CloudFormation service.

With the CDK, you can define your cloud resources using a high-level, object-oriented interface, which makes it easier to develop, test, and maintain cloud infrastructure. The CDK also includes a number of pre-built libraries and constructs for common cloud resources, such as Amazon Elastic Compute Cloud (EC2) instances, Amazon Simple Storage Service (S3) buckets, and Amazon Relational Database Service (RDS) databases, which can save you time and reduce the complexity of your code.

Overall, the AWS CDK is a powerful tool for developers who want to use code to define and manage their cloud infrastructure on AWS. It provides a high-level interface for working with AWS services and makes it easy to automate the provisioning and management of cloud resources.


Troubleshooting AWS – AWS CDK with the Lightrun Developer Observability Platform


Getting a sense of what’s actually happening inside a live application is a frustrating experience, one that relies mostly on querying and observing whatever logs were written during development.
Lightrun is a Developer Observability Platform, allowing developers to add telemetry to live applications in real-time, on-demand, and right from the IDE.
  • Instantly add logs to, set metrics in, and take snapshots of live applications
  • Insights delivered straight to your IDE or CLI
  • Works where you do: dev, QA, staging, CI/CD, and production

The most common issues for AWS – AWS CDK are:


(aws-secretsmanager): grant read fails when secret is fetched using fromSecretNamev2


This error can occur if you are using the fromSecretNamev2 method to fetch the secret and you have not properly configured the IAM permissions for the secret. The fromSecretNamev2 method fetches the latest version of the secret, and in order to grant read permissions for the secret, you will need to make sure that the IAM user or role that you are using has the secretsmanager:GetSecretValue permission for the secret.

Here are the steps you can follow to grant read permissions for a secret in AWS Secrets Manager:

  1. Open the IAM console and navigate to the Users or Roles page.
  2. Select the user or role that you want to grant permissions to.
  3. Click the “Add permissions” button.
  4. Select “Attach existing policies directly” and search for the secretsmanager:GetSecretValue policy.
  5. Select the checkbox next to the policy and click the “Next: Review” button.
  6. Review the permissions that you are granting and click the “Add permissions” button to apply the changes.


More issues from AWS repos


Troubleshooting aws-aws-sdk-js | Troubleshooting aws-sdk-java-v2 | Troubleshooting aws-aws-sam-cli | Troubleshooting aws-aws-toolkit-vs-code





It’s Really not that Complicated.

You can actually understand what’s going on inside your live applications.

Try Lightrun’s Playground

Lets Talk!

Looking for more information about Lightrun and debugging?
We’d love to hear from you!
Drop us a line and we’ll get back to you shortly.

By submitting this form, I agree to Lightrun’s Privacy Policy and Terms of Use.