How to Read Data from Amazon S3

6 visualizaciones (últimos 30 días)
Mohammed Al-Husaini
Mohammed Al-Husaini el 13 de Dic. de 2020
Respondida: Avni Agrawal el 25 de Feb. de 2025
can you help me to solve this proble??
the code is showing error !!!
setenv('AWS_ACCESS_KEY_ID', 'my access key ');
setenv('AWS_SECRET_ACCESS_KEY', 'my secret access key ');
>> ds = imageDatastore('s3://bcd1', ...
'IncludeSubfolders', true, 'LabelSource', 'foldernames');
img = ds.readimage(1);
imshow(img)
Error using imageDatastore (line 137)
's3://bcd1' is not a valid URL.

Respuestas (1)

Avni Agrawal
Avni Agrawal el 25 de Feb. de 2025
I understand that you are trying to access and read data from S3 into your MATLAB environment. To achieve this, you can use "imread" function. Please take a look at below example:
img = imread("s3://MyCloudData/FoodImageDataset/french_fries/french_fries_90.jpg");
I hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by