@Override
  public void deleteEnvironment(@NonNull final EnvironmentId environmentId)
      throws InternalServiceException {
    try {
      dynamoDBMapper.delete(
          EnvironmentDDBRecord.withKeys(
              environmentId.generateAccountIdCluster(), environmentId.getEnvironmentName()),
          SaveBehavior.CLOBBER.config());
    } catch (final AmazonServiceException e) {
      throw new InternalServiceException(
          String.format(
              "Fail to delete environment with accountIdCluster %s and environment name %s",
              environmentId.generateAccountIdCluster(), environmentId.getEnvironmentName()),
          e);
    }
  }
Check if environment revisions exist and clean them up.
data-service/src/main/java/com/amazonaws/blox/dataservice/repository/EnvironmentRepositoryDDB.java