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
960 stars 188 forks source link

AppConfig with just EFS fails to onboard tenants #510

Closed PoeppingT closed 1 year ago

PoeppingT commented 1 year ago

The Onboarding service fails to onboard tenants when only EFS is configured as a FileSystem

Reproduction Steps

  1. Install the latest version of SaaS Boost.
  2. Configure an AppConfig according to the getting-started instructions
  3. Upload an image once the ECR repository is created
  4. Try to onboard a tenant

What did you expect to happen?

The tenant should successfully onboard

What actually happened?

The onboarded moved to "Validated", but never past. Looking into the CloudWatch logs for onboarding-events shows:

java.lang.NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException
    at com.amazon.aws.partners.saasfactory.saasboost.OnboardingService.handleOnboardingTenantAssigned(OnboardingService.java:574)
    at com.amazon.aws.partners.saasfactory.saasboost.OnboardingService.handleOnboardingEvent(OnboardingService.java:354)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)

The code in question at this line is:

deployActiveDirectory = deployActiveDirectory || (Boolean) filesystem.get("configureManagedAd");

This is happening because the configureManagedAd is not actually part of the Filesystem object if EFS is selected. View the filesystem key in my appConfig:

"filesystem":{
  "type":"EFS",
  "mountPoint":"/mnt",
  "tiers":{
    "default":{
      "encrypt":true,
      "lifecycle":"NEVER"
    }
  }
}

This fix for this should just be to include a Null check. working on it now.

Environment

Other


This is :bug: Bug Report