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 réponse
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
EXPERT
iwasa
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions