I updated a file but CloudFront serves up an older version?

You need to create an invalidation request to CloudFront so the edge servers can remove the older version from their cache. Create invalidation after you have uploaded the latest version to the S3 bucket or custom origin server for the distribution.