func NewAWSStoreFactory(sess *session.Session, table, bucket string, maxOpenFiles int, indexCacheSize, tableCacheSize uint64, tableCacheDir string) chunks.Factory {
	var indexCache *indexCache
	if indexCacheSize > 0 {
		indexCache = newIndexCache(indexCacheSize)
	}
	var tc *fsTableCache
	if tableCacheSize > 0 {
		tc = newFSTableCache(tableCacheDir, tableCacheSize, maxOpenFiles)
	}
	ddb := dynamodb.New(sess)
	readRateLimiter := make(chan struct{}, defaultAWSReadLimit)
	return &AWSStoreFactory{
		ddb: ddb,
		persister: &awsTablePersister{
			s3.New(sess),
			bucket,
			readRateLimiter,
			tc,
			&ddbTableStore{ddb, table, readRateLimiter, sizecache.New(defaultSmallTableCacheSize)},
			awsLimits{defaultS3PartSize, minS3PartSize, maxS3PartSize, maxDynamoItemSize, maxDynamoChunks},
			indexCache,
		},
		table:         table,
		conjoiner:     inlineConjoiner{awsMaxTables},
		manifestLocks: newManifestLocks(),
		manifestCache: newManifestCache(defaultManifestCacheSize),
	}
}
NewAWSStoreFactory returns a ChunkStore factory that vends NomsBlockStore
instances that store manifests in the named DynamoDB table, and chunk data
in the named S3 bucket. All connections to AWS services share |sess|.
package nbs
import (
	"fmt"
	"os"
	"path"
	"github.com/attic-labs/noms/go/chunks"
	"github.com/attic-labs/noms/go/d"
	"github.com/attic-labs/noms/go/util/sizecache"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/dynamodb"
	"github.com/aws/aws-sdk-go/service/s3"
)
const (
	defaultAWSReadLimit = 1024
	awsMaxTables        = 128
	defaultSmallTableCacheSize = 1 << 28  
)
type AWSStoreFactory struct {
	ddb       ddbsvc
	persister tablePersister
	table     string
	conjoiner conjoiner
	manifestLocks *manifestLocks
	manifestCache *manifestCache
}