private uploadAuthTriggerFiles()

in src/export-backend-asset-handler/index.ts [327:358]


  private uploadAuthTriggerFiles(resourceName: string): undefined {
    const logicalId = `${AUTH_CATEGORY.NAME}${resourceName}`;
    const nestedStacks = this.exportManifest.props.loadNestedStacks;
    const verificationBucketName = _.get(nestedStacks, [
      logicalId,
      'parameters',
      PARAMTERS_AUTH_VERIFICATION_BUCKET_NAME,
    ]);
    if (verificationBucketName) {
      const verificationWithEnv = this.env
        ? `${verificationBucketName}-${this.env}`
        : verificationBucketName;

      const bucket = Bucket.fromBucketName(
        this,
        'auth-verification-bucket',
        verificationWithEnv,
      );
      const authAssets = path.join(
        this.exportPath,
        AUTH_CATEGORY.NAME,
        resourceName,
        AMPLIFY_AUTH_ASSETS,
      );
      new BucketDeployment(this, 'auth-asset-deployment-bucket', {
        destinationBucket: bucket,
        sources: [Source.asset(authAssets)],
        accessControl: BucketAccessControl.PUBLIC_READ,
      });
    }
    return;
  }