Check out example codes for "check if object exists in s3 bucket laravel". It will help you in understanding the concepts better.

Code Example 1

Gets whether or not the specified Amazon S3 object exists in the specified bucket.
AmazonS3 doesObjectExist
$s3 = new AmazonS3();
$bucket = 'my-bucket' . strtolower($s3->key);
$response = $s3->doesObjectExist($bucket, 'test1.txt');
// Success? (Boolean, not a CFResponse object)

Code Example 2

$info = $client->doesObjectExist($bucket, $FileName)
if ($info)
echo 'File exists';
echo 'File does not exists';

Learn ReactJs, React Native from