Skip to content
Advertisement

Indicate a directory on Amazon’s S3

I’m new to AWS services. I’ve always used the code below to calculate NDVI for images that were located in a directory.

JavaScript

Now all the necessary images are in an amazon S3 folder. How do I replace the lines below?

JavaScript

Advertisement

Answer

Amazon S3 is not a filesystem. You will need to use different commands to:

  • List the contents of a bucket/path
  • Download the files to local storage
  • Then access the files on local storage

You can use the boto3 AWS SDK for Python to access objects stored in S3.

For example:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement