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 Answer
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions