How to Read Data from Amazon S3
조회 수: 21 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Avni Agrawal
2025년 2월 25일
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");
For more information on accessing and writing S3 data in MATLAB, please take a look at this documentation for future reference: https://www.mathworks.com/help/cloudcenter/ug/transfer-data-to-amazon-s3-buckets.html#:~:text=MyCloudData/TrafficDataset/%20%2D%2Drecursive-,Access%20Data%20from%20Amazon%20S3%20in%20MATLAB,-After%20you%20store
I hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Web Services에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!