workload-discovery-on-aws icon indicating copy to clipboard operation
workload-discovery-on-aws copied to clipboard

Provided URL doesn't work

Open Martin-Azar opened this issue 1 year ago • 11 comments

Hi,

When I try to log in using the URL provided in the initial confirmation email I get the follow error:

AccessDenied Access Denied 4CWY1ZQERTT35QBN gw4Lsy7Ta+/0xW4FnxW439+Rxku92Yzi590viSvrv4VZzNaFkxtzjPoZVkQbjJD071wGyirtEgs=

Thanks, Martin


To Reproduce Steps to reproduce the behavior:

  1. Go to URL provided in initial confirmation email
  2. See error

Expected behavior Present log in screen

Browser (please complete the following information): Tried in Chrome and Edge

Martin-Azar avatar Dec 18 '23 22:12 Martin-Azar

The Cognito user pool that sends that email deploys before the custom resource that uploads the UI code to S3, hence the not found error. The main CloudFormation stack needs to be fully deployed before logging in will work.

svozza avatar Dec 18 '23 23:12 svozza

Thanks for your quick answer Stefano,

All the CloudFormation stacks have been fully deployed. Workload Discovery was working fine, but now it is not accessibly anymore.

I would appreciate if you send me more detailed indications of what can I check.

Thanks, Martin

Martin-Azar avatar Dec 19 '23 04:12 Martin-Azar

So you were able to log in at some point and now you can't and you're getting that Access Denied error? There should be a bucket called <stack-name>-s3buckets-1-webuibucket-<ID-String> (where stack-name is what you called the main WD stack you deployed) that has all the UI code. Check that it's not empty. If it is, go to the CodeBuild console and check that the job that deploys the UI code succeeded. It will be called <stack-name>-CodebuildStack-<ID-String>.

svozza avatar Dec 19 '23 10:12 svozza

Hi Stefano,

Bucket -s3buckets-1-webuibucket-<ID-String> was empty. CodeBuild project had Succeeded (4 months ago). So I re-run the CodeBuild project and then the S3 bucket got some objects.

After that the login page finally appeared, but when I try to login with the any of the users I had I get this error: "Configuration error (see console) – please contact the administrator".

I noticed that S3 bucket -s3buc-amplifystoragebucket-<ID-String> is empty.

What can I check next? Thanks, Martin

Martin-Azar avatar Dec 19 '23 21:12 Martin-Azar

Open up your browser dev tools, refresh the page and see are there any errors in the console. What version of WD are you running btw?

svozza avatar Dec 20 '23 10:12 svozza

Hi Stefano,

The error in the browser's console is:

[ERROR] 47:52.594 AuthError - Error: Amplify has not been configured correctly. The configuration object is missing required auth properties. This error is typically caused by one of the following scenarios:

        1. Did you run `amplify push` after adding auth via `amplify add auth`?
            See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information

        2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.

Martin-Azar avatar Dec 20 '23 20:12 Martin-Azar

Hmm, very odd. I would suggest upgrading to latest version of Workload Discovery (v2.1.3) that was released yesterday. This process will overwrite the UI packages in that bucket with the latest version and should get rid of the error. The upgrade is just done using the standard CloudFormation update process: https://docs.aws.amazon.com/solutions/latest/workload-discovery-on-aws/update-the-solution.html.

svozza avatar Dec 20 '23 20:12 svozza

Thank you, I'll try that. How can I verify my current version?

Martin-Azar avatar Dec 20 '23 20:12 Martin-Azar

The version will be in the description of the main CFN stack that you deployed. If you want to be extra sure it's cleaned down, empty the <stack-name>-s3buckets-1-webuibucket-<ID-String> bucket before you upgrade. It will look like this:

Workload Discovery on AWS Main Template (SO0075a) - Solution - Main Template (uksb-1r0720e27) (version:<VERSION>)

svozza avatar Dec 20 '23 20:12 svozza

Thanks. My current version is v2.0.3. I'll upgrade to the latest and let you know how it goes.

Regards, Martin

Martin-Azar avatar Dec 20 '23 21:12 Martin-Azar

Check your WAF configuration. IP address ACL. ApiAllowListedRanges

BQuinn-Assured avatar Feb 17 '24 18:02 BQuinn-Assured

Closing due to inactivity.

svozza avatar Aug 21 '24 20:08 svozza