-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment AlreadyExistsException #2096
Comments
I initially started this issue: #2074, but for the sake of deduplicating I closed it in favor of this, which is more explicit. Unfortunately, there's at least 4-5 more related issues: https://github.com/aws-amplify/amplify-console/issues?q=is%3Aissue+is%3Aopen+environment+exist+. For the time being, I worked around it by ditching
# https://docs.amplify.aws/cli/teams/commands#import-an-environment
echo "# Getting Amplify CLI Cloud-Formation stack info from environment cache"
BACKEND_ENV="$(aws amplify get-backend-environment --app-id ${AWS_APP_ID} --environment-name ${ENV} || true)"
if [[ ${BACKEND_ENV} ]];
then
STACKNAME="$(echo ${BACKEND_ENV} | jq --raw-output '.backendEnvironment.stackName')"
STACKINFO=$(aws cloudformation describe-stacks --stack-name ${STACKNAME} | jq '.Stacks[0]')
STACKINFO=$(echo ${STACKINFO} | jq '.Outputs | reduce .[] as $item ({}; .[$item.OutputKey] = $item.OutputValue)')
STACKINFO="{\
\"awscloudformation\":$STACKINFO\
}"
fi
export STACKINFO |
I found out |
The fix for this bug has been deployed. Please re-open if this behavior persists. Thank you! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Before opening, please confirm:
App Id
dazj4he0xk1lv
Region
us-east-1
Amplify Console feature
Backend builds, E2E tests, Previews
Describe the bug
Amplify backend build doesn't find an existing environment and throws an
AlreadyExistsException
exception. I can't do subsequent builds in Previews and now it even popped on a feature branch, since I alternated to that from Previews.Expected behavior
Find the existing environment, namely the environment that was created on the initial deployment.
Reproduction steps
It seems intermittent with the branch autodetection feature, but with Previews it happens consistently and it's probably the same bug.
Build Settings
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: