We examine the problem of allocating a resource repeatedly over time amongst a set of agents. The utility that each agent derives from consumption of the item is private information to that agent and, prior to consumption may be unknown to that agent. The problem is motivated by keyword auctions, where the resource to be allocated is a slot on a search page. We describe a mechanism based on a sampling-based learning algorithm that under suitable assumptions is asymptotically individually rational, asymptotically Bayesian incentive compatible and symptotically ex-ante efficient. The mechanism can be interpreted as a cost per action keyword auction.