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 Resposta
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
ESPECIALISTA
iwasa
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas