Check AWS env before using S3 cache