Skip to content

Accessing COGs from Azure Blob Storage #122

@charalamm

Description

@charalamm

Problem description

I have an azure blob storage account with the COG files and an eoapi raster runtime deployment. When anonymous read access is allowed on the blobs then everything works fine but when there is a requirement for credentials then the API returns 500.

To make the raster eoAPI work with the private blob storage I added the AZURE_STORAGE_CONNECTION_STRING environment variable but doesn't seem to solve the problem. At the same time I tried the following snippet on "production" and rasterio works with that environment variable.

import os
import rasterio

os.environ["AZURE_STORAGE_CONNECTION_STRING"] = "<>"

blob = "az://data/raster_file.tif"

with rasterio.open(blob, "r") as f:
    print(f.crs)

Environment Information

The raster runtime is deployed using the raster-uvicorn docker image as an azure container app.
The rasterio version in the container is 1.3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions