AWS S3 plugin store into bucket subfolder

Hello there,

I’m setting up a new pacs service with existing S3 bucket previously mounted with unofficial s3-fuse fs on EC2 instance.

During tests, following JSON configuration works well.

"AwsS3Storage": {
    "BucketName": "***",
    "Region": "***",
    "AccessKey": "***",
    "SecretKey": "***",
    "HybridMode": "WriteToObjectStorage",
    "StorageStructure": "legacy"
}

Unfortunately existing bucket was created with subfolders; I need to connect this Orthanc service to that bucket and store into one of those subfolders.

I found Endpoint parameter, don’t understand how it works, but I’m pretty sure it cannot help me.

How I can solve this?

Thank you

Jacopo

Hi Jacopo,

Have you tried to set the RootPath configuration (doc)

HTH,

Alain

1 Like

I missed it! It works like a charm.

Thank you so much Alain!

Jacopo

sir, How you integrated the s3 bucket where and all needed to keep like orthanc.json what need to keep and which plugin need to be use.Can you help in this

Hello!

I’m using Docker Compose to create my PACS environment, in order to deploy orthanc and db container to any type of server (e.g. monolithic like EC2, or even serverless Fargate).

In this way, I can pull orthanc version from DockerHub (e.g. osimis/orthanc:22.12.2) which already contains all plugins I need and then I can configure orthanc.json (better using secrets) with piece of code you reported. So, my orthanc.json contains the following:

"AwsS3Storage": {
    "BucketName": "***",
    "Region": "***",
    "AccessKey": "***",
    "SecretKey": "***",
    "HybridMode": "WriteToObjectStorage",
    "StorageStructure": "legacy"
}

I’m pretty sure this configuration could be set directly in environment variables of compose yml file instead of orthanc.json, but it is a choice.

Finally, you have to configure access to S3 with connected policy.

Hope this helps

Jacopo