aws-amplify / aws-amplify/amplify-hosting

Amplify Publish Fails After Adding Environment

Open
#1,463 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I'm getting the following error when publishing a new environment for the first time. This may be related to https://github.com/aws-amplify/amplify-adminui/issues/32 as I experienced that error when creating my environment. Publish worked fine in the default environment that was created when I initialized the project.

```
> amplify env checkout mydev
> amplify publish
...
√ 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.
An error occurred during the publish operation: User: arn:aws:sts::***********:assumed-role/us-east-1_*********_Full-access/amplifyadmin is not authorized to perform: amplify:ListJobs on resource: arn:aws:a
mplify:us-east-1:***********:apps/****************/branches/*********/jobs/*
```

**To Reproduce**
Steps to reproduce the behavior:
1. Enable Admin UI
2. Create new amplify environment using `amplify env add`
3. Try to publish this environment

**Expected behavior**
Publish should work without error

**Desktop (please complete the following information):**
- OS: Windows
- Amplify CLI 4.41.2

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `amplify env add`, `amplify env checkout mydev`, and `amplify publish` using Amplify CLI 4.41.2. Trace the publish path that requests `amplify:ListJobs` for the Amplify Console branch, then verify the fix by publishing the newly created environment successfully without the authorization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
authorization, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.