I am attempting to use the new S3 connector in SQL Server 2022 to backup a database to an S3 bucket. I have been following the instructions here:
I created the credential, and am trying to run the following:
BACKUP DATABASE database TO URL = 's3://bucket.s3-us-west-2.amazonaws.com/backups/database.bak' WITH FORMAT ,STATS = 10 ,COMPRESSION;
I get the following error message that I haven't been able to figure out:
Msg 3201, Level 16, State 1, Line 1 Cannot open backup device 's3://bucket.s3-us-west-2.amazonaws.com/backups/database.bak'. Operating system error 87(The parameter is incorrect.). Msg 3013, Level 16, State 1, Line 1 BACKUP DATABASE is terminating abnormally.
On the S3 side, I've been using the same bucket to backup files to from another server using a different program for any years, so I'm pretty sure it's set up correctly.
I ended up creating a new bucket (instead of using the existing one that backups from another source have been going to for years), and for some reason it works.