@Override
  public void deleteEnvironmentRevision(@NonNull final EnvironmentRevision environmentRevision)
      throws InternalServiceException {
    try {
      dynamoDBMapper.delete(
          EnvironmentRevisionDDBRecord.withKeys(
              environmentRevision.getEnvironmentId().generateAccountIdClusterEnvironmentName(),
              environmentRevision.getEnvironmentRevisionId()),
          SaveBehavior.CLOBBER.config());
    } catch (final AmazonServiceException e) {
      throw new InternalServiceException(
          String.format(
              "Could not delete environment revision with accountIdClusterEnvironmentName %s and environment revision %s",
              environmentRevision.getEnvironmentId().toString(),
              environmentRevision.getEnvironmentRevisionId()),
          e);
    }
  }
Check if environment revisions exist and clean them up.
data-service/src/main/java/com/amazonaws/blox/dataservice/repository/EnvironmentRepositoryDDB.java