aws-amplify / aws-amplify/amplify-hosting

Switch from automatic to manual deployments fails

Open
#3,677 3 comments 1 reaction 1 assignee Claimed by @mauerbac View on GitHub
git-providers manual-deploy usability
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [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.

### App Id

d3mqvgiptwomr

### AWS Region

eu-central-1

### Amplify Hosting feature

Deployments, Manual deploys

### Frontend framework

Angular

### Next.js version

N/A

### Next.js router

N/A

### Describe the bug

We connected our git repo through the amplify console and set it up for automatic deployments on each commit about 1.5 years ago. Because the amplify CI/CD does not cover all of our needs, we'd now like to change to manual deployments via amplify publish and do the deployment in the pipeline of our git provider, instead.

We disconnected all the branches in the amplify console (for lack of disconnecting the entire repo) and then added hosting via the cli with "amplify add hosting":

```
➜ amplify add hosting
✔ Select the plugin module to execute · Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)
? Choose a type Manual deployment

You can now publish your app using the following command:

Command: amplify publish
```

However, when then running "amplify publish", while the backend deployment passes without any issues, for the frontend deployment we get the following error:

```
✖ Deployment failed! Please report an issue on the Amplify Console GitHub issue tracker at https://github.com/aws-amplify/amplify-console/issues.
:octagonal_sign: Operation not supported. App is already connected a repository.
```

### Expected behavior

amplify publish works and deploys the backend and frontend.

### Reproduction steps

1. Create an amplify application and add hosting through the amplify console by connecting the git repository
2. Disconnect all the branches in the console (since there's no way to disconnect the repo)
3. Run "amplify add hosting", choose "Hosting with Amplify Console" and "Manual deployment"
4. Run "amplify publish"
5. See error

### Build Settings

_No response_

### Log output

```
# amplify publish output
...
Done in 16.39s.
✔ Zipping artifacts completed.
✖ Deployment failed! Please report an issue on the Amplify Console GitHub issue tracker at https://github.com/aws-amplify/amplify-console/issues.
:octagonal_sign: Operation not supported. App is already connected a repository.

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: 8722b71e-2bd2-46d6-ab33-ec17fce9ef90

:white_check_mark: Report saved: /tmp//report-1693310878055.zip

✔ Done

Project Identifier: 809daeeb99aae0ff84c097e535188112

```

### Additional information

A similar issue was reported before and from the reactions I see there, it seems like a lot of people are confused that it was closed without a resolution: https://github.com/aws-amplify/amplify-hosting/issues/956

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.