aws-amplify / aws-amplify/amplify-cli

Amplify Environment Pull Error

Open
#14,185 5 comments 0 reactions 0 assignees View on GitHub
bug windows
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

npm

### If applicable, what version of Node.js are you using?

v22.14.0

### Amplify CLI Version

13.0.1

### What operating system are you using?

Windows

### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

"No manual changes made"

### Describe the bug

When working with multiple Amplify environments on Windows 11, attempting to sequentially pull different environments using amplify pull works for the first environment but fails on the second pull within the same project directory when using VS Code's integrated PowerShell terminal.

Errors observed:

**EPERM: operation not permitted, symlink ...

EBUSY: resource busy or locked, unlink ...

This seems to be related to symlink creation and file locking under amplify-backup during the backup operation before switching environments.

Important observation:
Running the same flow inside Command Prompt (with Developer Mode enabled) works fine for both environments.**

### Expected behavior

he expected behavior is:

Pull environment 1 successfully

Pull environment 2 successfully, replacing the previous backend state with the new one

Allow smooth merging and environment switching within the same project folder, without file lock, symlink, or permission errors — regardless of whether it’s inside VS Code terminal or Command Prompt

### Reproduction steps

Reproduction flow
Environment:

OS: Windows 11

Amplify CLI: Latest version (Node.js environment)

VS Code integrated PowerShell terminal

Steps:

Ensure Developer Mode is enabled in Windows

Open VS Code

Open integrated terminal (PowerShell)

Navigate to project folder correctly:

Error messages:

EPERM: operation not permitted, symlink ...

EBUSY: resource busy or locked, unlink ...

Now, try the same two-pull flow using Command Prompt (Developer Mode enabled) — both pulls work fine.

### Project Identifier

_No response_

### Log output

EPERM: operation not permitted, symlink 'D:\Projects\myproject-dev\myproject\amplify\backend' -> 'D:\Projects\myproject-dev\myproject\amplify-backup\backend\node_modules\overrides-for-auth-resource'

EBUSY: resource busy or locked, unlink 'D:\Projects\myprojectv-dev\myproject\amplify-backup\backend\node_modules\rxjs\LICENSE.txt'

Command Prompt (Developer Mode enabled):
✅ Both amplify pull operations succeed.

### Additional information

_No response_

### Before submitting, please confirm:

- [x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [x] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Research direction

Reproduce two sequential amplify pull operations in the VS Code integrated PowerShell terminal on Windows 11, then compare with Command Prompt. Start by examining the amplify/backend and amplify-backup paths named in the EPERM symlink and EBUSY unlink logs. Done means switching to the second environment succeeds without symlink, lock, or permission errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.