func parseJobIDFromKey(key string) string {
	idStartIdx := strings.LastIndex(key, "/") + 1
	endIdx := len(key) - len(".json")
	return key[idStartIdx:endIdx]
}
Expects a key like "<folder>/job_123.json"

returns the job id
package main
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"log"
	"strings"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/s3"
)
type PersistedJobClient interface {
	FetchJob(id string) (*job, error)
	FetchFlowJobIds(flowID string) ([]string, error)
}
type s3JobClient struct {
	bucketName string
	jobsPrefix string
	flowPrefix string
	s3Client   *s3.S3
}
func NewS3JobClient(awsRegion string, bucketName string, jobsPrefix string, flowPrefix string) PersistedJobClient {
	config := &aws.Config{
		Region: aws.String(awsRegion),
	}
	return &s3JobClient{
		bucketName: bucketName,
		jobsPrefix: jobsPrefix,
		flowPrefix: flowPrefix,
		s3Client:   s3.New(session.Must(session.NewSession(config))),
	}
}