How to use Kiro IDE to diagnose and fix code errors, deployment failures, and AWS issues — without needing to understand the error yourself.
When something breaks, copy the error and paste it into Kiro. That's it. Kiro reads the error, understands the context of your project, and tells you exactly what to fix.
You don't need to understand the error message. You just need to give Kiro enough context:
Your Lambda function throws an error like ImportError, KeyError, TypeError, or returns a 500 response.
backend/lambda/app.py)This Lambda function is throwing an error. Here's the error from CloudWatch logs:
[paste the full error traceback here]
Fix it.
Your app shows a blank page, buttons don't work, or the browser console shows errors.
frontend/index.html in Kiro and paste:My frontend is broken. Browser console shows this error:
[paste error here]
The file is open. Fix it.
Browser console shows: Access to fetch at '...' has been blocked by CORS policy
I'm getting a CORS error when my frontend calls the Lambda function URL.
Error: Access to fetch at 'https://xxx.lambda-url.ap-southeast-1.on.aws/'
from origin 'http://my-bucket.s3-website...' has been blocked by CORS policy.
My Lambda is a Flask app using Lambda Web Adapter with response streaming.
Fix the CORS headers in my Lambda function.
Your deployment shows a red ❌ in the GitHub Actions tab.
My GitHub Actions deployment failed at the [step name] step. Here's the error:
[paste the full error output]
What's wrong and how do I fix it?
Deployment fails with errors like CREATE_FAILED, ROLLBACK_COMPLETE, or resource-specific errors.
My SAM deploy failed with this CloudFormation error:
[paste error]
My template.yaml is open. Fix it.
| Error | Likely cause |
|---|---|
Resource already exists | A previous failed deploy left resources behind. Delete the stack first. |
ROLLBACK_COMPLETE | Stack is stuck. Delete it in CloudFormation console, then redeploy. |
Insufficient permissions | IAM role missing a policy. Tell Kiro which permission is denied. |
Template format error | YAML indentation issue. Kiro can fix this instantly. |
S3 bucket already exists | Bucket names are global. Change the name in template.yaml. |
Errors like ExpiredTokenException, InvalidClientTokenId, or Access Denied.
| Error | Fix |
|---|---|
ExpiredTokenException | Your session token expired. Get fresh credentials from the sandbox portal and update GitHub secrets. |
InvalidClientTokenId | Access key is wrong. Double-check the AWS_ACCESS_KEY_ID secret — no extra spaces. |
Access Denied | Your IAM role doesn't have the required permission. Tell Kiro which action was denied. |
Credentials could not be loaded | GitHub secrets are not set or named incorrectly. Check Settings → Secrets. |
Your AI feature returns an error instead of a response.
| Error | Fix |
|---|---|
AccessDeniedException | Model not enabled. Go to Bedrock → Model access → enable the model. |
ModelNotReadyException | Model access is still pending. Wait a few minutes and retry. |
ValidationException | Bad request format. Paste the full error into Kiro — it'll fix the API call. |
ThrottlingException | Too many requests. Add retry logic — ask Kiro to add exponential backoff. |
ModelTimeoutException | Request took too long. Reduce prompt length or increase Lambda timeout. |
| Empty response (no error) | Claude's safety filter declined. Rephrase the prompt to be more specific. |
My Bedrock call is failing with this error:
[paste error]
My Lambda function file is open. Fix the Bedrock API call.
Follow this process for any error:
| Problem | Where to look |
|---|---|
| Deployment failed | GitHub → Actions → click failed run → click failed step → read red text |
| App shows error in browser | Browser DevTools (F12) → Console tab → red messages |
| API returns error | Browser DevTools → Network tab → click the failed request → Response tab |
| Lambda function error | AWS Console → CloudWatch → Log groups → find your function → latest log stream |
| CloudFormation error | AWS Console → CloudFormation → your stack → Events tab → look for FAILED |
| Bedrock error | CloudWatch logs for your Lambda function (Bedrock errors appear there) |
#Problems in Kiro chat to share all current file diagnostics#Terminal to share your terminal output with KiroCopy any of these and replace the bracketed parts:
I'm getting this error: [paste error]. The relevant file is open. Fix it.
My GitHub Actions deploy failed at [step name]. Error: [paste]. What's wrong?
My Lambda function crashes with: [paste traceback]. Fix the bug.
Explain this error in simple terms and fix it: [paste error]
I have several errors after deploying. Here's the first one: [paste].
Fix this one first, then I'll share the next.