Scientists have many computing infrastructures available to conduct their research, including grids and public or private clouds. This article explores the use of these cyber-infrastructures to execute scientific workflows, an important class of scientific applications. In particular, it examines the benefits and drawbacks of cloud and grid systems using the case study of an astronomy application that analyzes data from the NASA Kepler mission to compute periodograms. The authors describe their experiences modeling the periodogram application as a scientific workflow using Pegasus and deploying it on the FutureGrid scientific cloud testbed, the Amazon EC2 commercial cloud, and the Open Science Grid. They also compare and contrast the infrastructures in terms of setup, usability, cost, resource availability, and performance.