最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

amazon s3 - s3 CORS config must be in valid JSON - Stack Overflow

programmeradmin1浏览0评论

I am experiencing issues configuring my CORS policy for my s3 bucket. I began experiencing this after realizing I am able to retrieve the s3 files and display them during development, but when I pushed the changes to my production environment, the files are not returning. I used the following JSON:

{
    "CORSRules": [
        {
            "AllowedOrigins": [
                "*"
            ],
            "AllowedMethods": [
                "GET"
            ],
            "AllowedHeaders": [
                "*"
            ]
        }
    ]
}

I am getting this error in return after attempting to save my changes:

The CORS configuration must be written in valid JSON.
API response
Expected params.CORSConfiguration.CORSRules to be an Array

I then used Amazon Q to diagnose, and requested a resolution, which then provided the exact same response in a different format:

{
    "CORSRules": [
        {
            "AllowedHeaders": ["*"],
            "AllowedMethods": ["GET"],
            "AllowedOrigins": ["*"]
        }
    ]
}

And the error still persists. I would appreciate any suggestions!

发布评论

评论列表(0)

  1. 暂无评论