# Terraform: Error: Cannot import non-existent remote object — While attempting to import an existing object to "aws_s3_bucket.logs", the provider detected that no object exists with the given id

**Code:** `Cannot import non-existent remote object` · **Category:** Terraform · **Seen on:** Terraform

`terraform import` (or an import block) used an ID that the provider can't find.

## Meaning

Verify the ID format required by the resource docs ("Import" section: sometimes `name`, sometimes ARN or `cluster/service`), the region/account (provider config), and that the object exists. Check your provider alias and credentials target the right environment.

## Common causes

- Wrong ID format
- Object in another region/account/project
- Typo
- Provider alias mismatch
- Object deleted

## Quick fix

1. Look up the import ID format in the provider docs
2. Confirm with the CLI (`aws s3api head-bucket`, `az resource show`)
3. Set the right provider region/alias

## Detailed fix by platform

### Terraform

1. `terraform import -var-file=prod.tfvars aws_instance.web i-0abc123456`

## How to diagnose

1. **ID** — Format per docs?
2. **Region** — Provider config?
3. **Exists** — CLI check?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/terraform/import-cannot-import-non-existent-remote-object)
