How to return some json to specific path when www.mydomain.com hosted in S3?

0

My domain(www.mydomain.com) is hosted in s3. It is a static website. But I want to return a JSON file to this path www.mydomain.com/.well-known/assetlinks.json how can I achieve that?

  • Can you not simply upload the file to the S3 bucket with the path /.well-known/assetlinks.json?

1 Risposta
0

Hi, @Asit Dixit

If you have "The specified key does not exist" error, you need to create an S3 bucket with a custom domain name.
I was able to create and access an S3 bucket as follows.

Enter image description here

% curl http://hoge1224.tak1wa.com/.well-known/assetlinks.json
{
    "hoge":"fuga"
}

Note: I'm assuming you don't use CloudFront. If you use CloudFront, you can create an S3 bucket without using a custom domain name.

profile picture
ESPERTO
iwasa
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande