I have an AWS S3 bucket to which I have multiple folders.
s3 = AWS::S3.new
bucket = s3.buckets['test']
bucket.exists? => true
Say I have a resource named demo/index.html
, how I will check whether this resource is present in this bucket
?
May be my question is too simple, but I am not able to find a proper answer for this. Any help is appreciated.
#exists? ⇒ Boolean
http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/S3/S3Object.html#exists%3F-instance_method