Amazon S3:
Amazon S3 (Simple Storage Service) is a large capacity, low-cost file storage solution offered by Amazon. It is designed to make web-scale computing easier for developers. Users of Amazon S3 can upload, store and retrieve any amount of data, at any time, from anywhere on the web.
Example: Let's say there is an application that lets users upload images. In the back-end, that image is getting stored in Amazon S3 which is set up in Virginia location. you can think of it as a data center for the application situated in Virginia.
Amazon CloudFront:
Amazon CloudFront is a Content Delivery Network(CDN) service by Amazon which is used to save the cached version of applications or web data at multiple availability zones to prevent latency issues.
Example: In continuation to the above-mentioned example for Amazon S3, let's say the user base of that application also exists in some other region, say India. So, when the end-users of India, try to upload images, the requests will have to be taken to the region where the application is hosted which might cause latency issues and delays in response time of the application. So, to prevent latency issues, CDN is introduced which will act as a middleware between the user base and application. The application will be cached to an availability zone closest to the user base in India and then the requests will be that nearest availability zone which in turn enhances the delivery performance of the application and decreases the latency time.