Error map

DependencyViolation: resource has dependent objects (destroy) Terraform: Error: deleting EC2 VPC (vpc-0abc): DependencyViolation: The vpc 'vpc-0abc' has dependencies and cannot be deleted

Terraform · layer 6, Platform & cloud

Open the full error page →

Centre: this error. First ring: errors it is linked with (7). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

DependencyViolation: resource has dependent objects (destroy) — Terraform: Error: deleting EC2 VPC (vpc-0abc): DependencyViolation: The vpc 'vpc-0abc' has dependencies and cannot be deleted (Terraform)DependencyV…Invalid AWS Region — Terraform: Error: Invalid AWS Region: us-east-3 / Error: configuring Terraform AWS Provider: validating provider credentials: operation error STS: GetCallerIdentity (Terraform)Invalid AWS Regiontimeout while waiting for state to become 'available' — Terraform: Error: waiting for RDS DB Instance create: timeout while waiting for state to become 'available' (last state: 'creating', timeout: 40m0s) (Terraform)timeout while waiti…Error: Cycle (dependency cycle) — Terraform: Error: Cycle: aws_security_group.a, aws_security_group.b (Terraform)Error: Cycle (depen…Instance cannot be destroyed (lifecycle.prevent_destroy) — Terraform: Error: Instance cannot be destroyed — Resource aws_db_instance.prod has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed (Terraform)Instance cannot be …No valid credential sources found (AWS provider) — Terraform: Error: No valid credential sources found — failed to refresh cached credentials, no EC2 IMDS role found / Error: configuring Terraform AWS Provider: no valid credential sources (Terraform)No valid credential…UnauthorizedOperation / AccessDenied during Terraform apply — Terraform: Error: creating EC2 Instance: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::123:user/ci is not authorized to perform: ec2:RunInstances (Terraform)UnauthorizedOperati…BucketNotEmpty: bucket you tried to delete is not empty — Terraform: Error: deleting S3 Bucket (my-bucket): BucketNotEmpty: The bucket you tried to delete is not empty (Terraform)BucketNotEmpty: buc…PermanentRedirect — S3 PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint (AWS)PermanentRedirectInvalidKeyPair.NotFound — InvalidKeyPair.NotFound: The key pair 'x' does not exist (AWS)InvalidKeyPair.NotF…InvalidAMIID.NotFound — InvalidAMIID.NotFound: The image id '[ami-xxxx]' does not exist (AWS)InvalidAMIID.NotFou…Task timed out — AWS Lambda: Task timed out after X seconds (AWS)Task timed outEndpoint request timed out — API Gateway: {"message": "Endpoint request timed out"} (504 after 29 seconds) (AWS)Endpoint request ti…exceeded the maximum execution time — GitHub Actions: The job running on runner GitHub Actions 12 has exceeded the maximum execution time of 360 minutes (CI/CD)exceeded the maximu…Runtime.ImportModuleError — Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'x' (AWS)Runtime.ImportModul…Reference to undeclared resource — Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable (Terraform)Reference to undecl…Invalid for_each argument (keys cannot be determined until apply) — Terraform: Error: Invalid for_each argument — The "for_each" map includes keys derived from resource attributes that cannot be determined until apply (Terraform)Invalid for_each ar…Resource is tainted and must be replaced — Terraform: # aws_instance.web is tainted, so must be replaced — -/+ destroy and then create replacement (Terraform)Resource is tainted…Moved object still exists — Terraform: Error: Moved object still exists — This statement declares a move from aws_x.old, but that resource instance is still declared at main.tf (Terraform)Moved object still …Provider configuration not present (removed resource) — Terraform: Error: Provider configuration not present — its original provider configuration is required, but it has been removed (Terraform)Provider configurat…ExpiredToken — AWS: ExpiredToken — The security token included in the request is expired (AWS)ExpiredTokenNoCredentialsError — AWS: Unable to locate credentials / Could not load credentials from any providers (AWS)NoCredentialsErrorSignatureDoesNotMatch — AWS: SignatureDoesNotMatch / InvalidClientTokenId — the request signature we calculated does not match (AWS)SignatureDoesNotMat…IAM AccessDeniedException — AccessDeniedException: User: arn:aws:iam::... is not authorized to perform: service:Action on resource: ... (AWS)IAM AccessDeniedExc…sts:AssumeRole denied — is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::...:role/... (AWS)sts:AssumeRole deni…Cloud Run 403: Your client does not have permission to get URL — Cloud Run: Error: Forbidden — Your client does not have permission to get URL / from this server (Google Cloud / Firebase)Cloud Run 403: Your…Error loading state: AccessDenied (S3 backend) — Terraform: Error: Failed to load state: AccessDenied: Access Denied / Error refreshing state: AccessDenied status code: 403 (Terraform)Error loading state…S3 backend: NoSuchBucket / bucket does not exist — Terraform: Error: Failed to get existing workspaces: S3 bucket "my-tf-state" does not exist / NoSuchBucket: The specified bucket does not exist (Terraform)S3 backend: NoSuchB…

Directly related (7)

Invalid AWS RegionTerraform

Terraform: Error: Invalid AWS Region: us-east-3 / Error: configuring Terraform AWS Provider: validating provider credentials: operation error STS: GetCallerIdentity

The `region` is invalid/unavailable, or the provider can't reach AWS endpoints to validate credentials.

timeout while waiting for state to become 'available'Terraform

Terraform: Error: waiting for RDS DB Instance create: timeout while waiting for state to become 'available' (last state: 'creating', timeout: 40m0s)

The resource didn't reach the target state before the provider's timeout.

Error: Cycle (dependency cycle)Terraform

Terraform: Error: Cycle: aws_security_group.a, aws_security_group.b

Resources reference each other (directly or indirectly), so Terraform can't order them.

Instance cannot be destroyed (lifecycle.prevent_destroy)Terraform

Terraform: Error: Instance cannot be destroyed — Resource aws_db_instance.prod has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed

The plan would destroy a resource protected with `lifecycle { prevent_destroy = true }`.

No valid credential sources found (AWS provider)Terraform

Terraform: Error: No valid credential sources found — failed to refresh cached credentials, no EC2 IMDS role found / Error: configuring Terraform AWS Provider: no valid credential sources

The AWS provider found no credentials (env vars, shared config, SSO, role, instance profile).

UnauthorizedOperation / AccessDenied during Terraform applyTerraform

Terraform: Error: creating EC2 Instance: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::123:user/ci is not authorized to perform: ec2:RunInstances

The IAM identity used by Terraform lacks a permission needed for that resource.

BucketNotEmpty: bucket you tried to delete is not emptyTerraform

Terraform: Error: deleting S3 Bucket (my-bucket): BucketNotEmpty: The bucket you tried to delete is not empty

Terraform can't delete an S3 bucket that still holds objects (or versions).

Two steps away (20)

PermanentRedirectAWS

S3 PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint

The request went to the wrong S3 region/endpoint for that bucket.

InvalidKeyPair.NotFoundAWS

InvalidKeyPair.NotFound: The key pair 'x' does not exist

The key pair name you passed doesn’t exist in that region (key pairs are regional).

InvalidAMIID.NotFoundAWS

InvalidAMIID.NotFound: The image id '[ami-xxxx]' does not exist

The AMI ID isn’t available in this region/account — AMI IDs are regional and private AMIs must be shared.

Task timed outAWS

AWS Lambda: Task timed out after X seconds

The function ran longer than its configured timeout (default 3 seconds) and Lambda stopped it.

Endpoint request timed outAWS

API Gateway: {"message": "Endpoint request timed out"} (504 after 29 seconds)

The backend (usually Lambda) didn’t respond within API Gateway’s integration timeout (29 seconds by default for REST APIs).

exceeded the maximum execution timeCI/CD

GitHub Actions: The job running on runner GitHub Actions 12 has exceeded the maximum execution time of 360 minutes

A job ran longer than its time limit — your `timeout-minutes`, or the 6-hour (360 minute) platform limit — and was cancelled.

Runtime.ImportModuleErrorAWS

Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'x'

Lambda couldn’t load your handler file or one of its dependencies — the package is missing from the deployment zip/layer or the h…

Reference to undeclared resourceTerraform

Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable

The configuration refers to a resource, data source, variable or module output that isn’t declared in this module.

Invalid for_each argument (keys cannot be determined until apply)Terraform

Terraform: Error: Invalid for_each argument — The "for_each" map includes keys derived from resource attributes that cannot be determined until apply

`for_each` keys depend on values only known after apply, so Terraform can't plan which instances exist.

Resource is tainted and must be replacedTerraform

Terraform: # aws_instance.web is tainted, so must be replaced — -/+ destroy and then create replacement

A previous apply failed during creation, so Terraform marked the resource tainted and will recreate it.

Moved object still existsTerraform

Terraform: Error: Moved object still exists — This statement declares a move from aws_x.old, but that resource instance is still declared at main.tf

A `moved` block points at an address that is still present in the configuration.

Provider configuration not present (removed resource)Terraform

Terraform: Error: Provider configuration not present — its original provider configuration is required, but it has been removed

A resource in state needs a provider configuration (alias) that no longer exists in the code.

ExpiredTokenAWS

AWS: ExpiredToken — The security token included in the request is expired

Temporary AWS credentials (STS/SSO/assumed role) have expired.

NoCredentialsErrorAWS

AWS: Unable to locate credentials / Could not load credentials from any providers

The AWS CLI/SDK found no credentials in any place it looks — env vars, profile files, SSO cache or an instance/task role.

SignatureDoesNotMatchAWS

AWS: SignatureDoesNotMatch / InvalidClientTokenId — the request signature we calculated does not match

AWS rejected the request signature — wrong secret key, wrong region, clock skew, or a presigned URL used differently from how it…

IAM AccessDeniedExceptionAWS

AccessDeniedException: User: arn:aws:iam::... is not authorized to perform: service:Action on resource: ...

The IAM user or role making the call has no permission for that action on that resource — the message names both.

sts:AssumeRole deniedAWS

is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::...:role/...

The caller can’t assume the role — either its own policy doesn’t allow sts:AssumeRole, or the role’s trust policy doesn’t trust t…

Cloud Run 403: Your client does not have permission to get URLGoogle Cloud / Firebase

Cloud Run: Error: Forbidden — Your client does not have permission to get URL / from this server

The Cloud Run service requires authentication and the caller has no valid identity token or the `roles/run.invoker` role.

Error loading state: AccessDenied (S3 backend)Terraform

Terraform: Error: Failed to load state: AccessDenied: Access Denied / Error refreshing state: AccessDenied status code: 403

Terraform can't read/write the S3 bucket (or DynamoDB table) that stores state — IAM permissions or wrong credentials/role.

S3 backend: NoSuchBucket / bucket does not existTerraform

Terraform: Error: Failed to get existing workspaces: S3 bucket "my-tf-state" does not exist / NoSuchBucket: The specified bucket does not exist

The S3 bucket configured as the state backend doesn't exist (or is in another region/account).