awslabs / aws-saas-boost

AWS SaaS Boost is a ready-to-use toolset that removes the complexity of successfully running SaaS workloads in the AWS cloud.
Apache License 2.0
954 stars 188 forks source link

error in build during " Provision AWS SaaS Boost into your AWS Account" #506

Closed rggatech closed 1 year ago

rggatech commented 1 year ago

:question: General Issue

The Question

following "getting started guide" https://github.com/awslabs/aws-saas-boost/blob/main/docs/getting-started.md

invoking the "sh ./install.sh" command only reports "Error building installer for SaaS boost"

(see other information below). How are the awscredentials resolved to fix this error?

Environment

Other information

Found more detail on error in the surefire-reports:

Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.212 s <<< FAILURE! - in com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest refreshingCredentialsProviderFindsNewCredentials(com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest) Time elapsed: 0.128 s <<< FAILURE! java.lang.AssertionError: expected:<AwsCredentials(accessKeyId=AKIAIOSFODNN7EXAMPLE)> but was:<AwsCredentials(accessKeyId=

actual accesskeyid deleted from this report

brtrvn commented 1 year ago

I haven't been able to reproduce this. Do you have multiple AWS CLI profiles on your workstation? Does aws configure list-profiles give you more that just the default? Have you exported the environment variable AWS_PROFILE prior to running the install script? Can you give us any more details on your setup? Do you see this error if you run the installer in a Cloud9 instance?

rggatech commented 1 year ago

Hello,

I will work through the process using cloud9 later today. Here are my responses to your questions. Thank you for your assistance.

MacBook Pro, 2.8Ghz i7, 16GB, Ventura 13.3.1 Corretta installed: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/macos-install.html Maven installed:
brew install maven

aws configure list-profiles: default AWS_PROFILE was not exported and is not set.

I have the following set up in my zsh shell & .aws/credentials

AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY=

redirected output of mvn command in install.sh to a file instead of /dev/null. Here is the output:

[ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.212 s <<< FAILURE! - in com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest [ERROR] refreshingCredentialsProviderFindsNewCredentials(com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest) Time elapsed: 0.128 s <<< FAILURE! java.lang.AssertionError: expected:<AwsCredentials(accessKeyId=AKIAIOSFODNN7EXAMPLE)> but was:<AwsCredentials(accessKeyId=xxxxxxxxxxxxxxxxxx)> at com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest.runUpdatingCredentialsProviderTest(RefreshingProfileDefaultCredentialsProviderTest.java:129) at com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest.refreshingCredentialsProviderFindsNewCredentials(RefreshingProfileDefaultCredentialsProviderTest.java:121)

[ERROR] defaultCredentialsProviderBugStillExists(com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest) Time elapsed: 0.013 s <<< FAILURE! java.lang.AssertionError: expected:<AwsCredentials(accessKeyId=AKIAIOSFODNN7EXAMPLE)> but was:<AwsCredentials(accessKeyId=xxxxxxxxxxxxxxxx)> at com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest.runUpdatingCredentialsProviderTest(RefreshingProfileDefaultCredentialsProviderTest.java:129) at com.amazon.aws.partners.saasfactory.saasboost.clients.RefreshingProfileDefaultCredentialsProviderTest.defaultCredentialsProviderBugStillExists(RefreshingProfileDefaultCredentialsProviderTest.java:107)

Enter a String value for parameter RequiredStringParameter: [ERROR] Failures: [ERROR] RefreshingProfileDefaultCredentialsProviderTest.defaultCredentialsProviderBugStillExists:107->runUpdatingCredentialsProviderTest:129 expected:<AwsCredentials(accessKeyId=AKIAIOSFODNN7EXAMPLE)> but was:<AwsCredentials(accessKeyId=xxxxxxxxxxxxxxxx)> [ERROR] RefreshingProfileDefaultCredentialsProviderTest.refreshingCredentialsProviderFindsNewCredentials:121->runUpdatingCredentialsProviderTest:129 expected:<AwsCredentials(accessKeyId=AKIAIOSFODNN7EXAMPLE)> but was:<AwsCredentials(accessKeyId=xxxxxxxxxxxx)> [ERROR] Tests run: 21, Failures: 2, Errors: 0, Skipped: 0 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project SaaSBoostInstall: There are test failures. [ERROR] [ERROR] Please refer to /Users/rod/development/projects/saas/aws-saas-boost/installer/target/surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

rggatech commented 1 year ago

No issues with Cloud9 installation

PoeppingT commented 1 year ago

Hey @rggatech , thanks for the bug report! I've confirmed that this test breaks if you have credentials set in your zsh.

If you need to be unblocked immediately, please unset those from your shell before installing. You can do so by running

unset AWS_ACCESS_KEY
unset AWS_SECRET_ACCESS_KEY

And of course if you want to reset those all you need to do is either reset your terminal or re-source your .zshrc file:

source /path/to/.zshrc
rggatech commented 1 year ago

Thank you for your timely response. The solution worked. The installation completed and the SaaS Boost installation/deployment menu is available.