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 Antwort
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
EXPERTE
iwasa
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen