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!