Why don't you just create a case class
```scala
case class BundleTarget(name: String, targetBucket: Option[String]) 
```
and make the bundles map of type Map[BundleTarget, List[String]]?
That way you could postpone the assigning of the target buckets that you do in customBucketMap  to where this data is actually needed: when actually publishing the bundles to the S3 buckets. You'd be able to get this knowledge form the BundleTarget case class.