1 回答
- 最新
- 投票最多
- 评论最多
1
Hello.
The content type of the object placed in S3 may not be "text/html".
Try changing the content type with the following command.
aws s3 cp --content-type text/html s3://your-bucket-name/index.html s3://your-bucket-name/index.html --recursive
Also, delete the CloudFront cache after making the change.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#Invalidation_Requests
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
Can I do this using the sdk?
Yes, it is possible. This can be done by using "copy_object" as described in the following document. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/copy_object.html