title: Backup from MSSQL RDS straight to S3 bucket with error
body: <p>Good day, please can someone assist me. I am trying to backup from MSSQL RDS to S3. I have created the following:</p>
  <p>I have created a policy with permissions:</p>
  <pre><code>{
  &quot;Version&quot;: &quot;2012-10-17&quot;,
  &quot;Statement&quot;: [
      {
          &quot;Effect&quot;: &quot;Allow&quot;,
          &quot;Action&quot;: [
              &quot;s3:AbortMultipartUpload&quot;,
              &quot;s3:DeleteObject&quot;,
              &quot;s3:ListMultipartUploadParts&quot;,
              &quot;s3:PutObject&quot;
          ],
          &quot;Resource&quot;: [
              &quot;arn:aws:s3:::ksys-ew1p-oct-dbbackup/*&quot;
          ]
      },
      {
          &quot;Effect&quot;: &quot;Allow&quot;,
          &quot;Action&quot;: [
              &quot;s3:GetBucketLocation&quot;,
              &quot;s3:ListBucket&quot;,
              &quot;s3:ListBucketMultipartUploads&quot;
          ],
          &quot;Resource&quot;: [
              &quot;arn:aws:s3:::ksys-ew1p-oct-dbbackup&quot;
          ]
      }
  ]
  </code></pre>
  <p>}</p>
  <p>I have created an IAM role using the above policy and the following &quot;trust relationships&quot;:
  <code>{ &quot;Version&quot;: &quot;2012-10-17&quot;, &quot;Statement&quot;: [{ &quot;Effect&quot;: &quot;Allow&quot;, &quot;Principal&quot;: {&quot;Service&quot;:  &quot;rds.amazonaws.com&quot;}, &quot;Action&quot;: &quot;sts:AssumeRole&quot; }] }</code></p>
  <p>I have created the option group with a backup_restore option.</p>
  <p>When running the following my backup script as follows:</p>
  <p><code>exec msdb.dbo.rds_backup_database  @source_db_name='octopus', @s3_arn_to_backup_to='arn:aws:s3:::ksys-ew1p-oct-dbbackup/Backups/octopus.bak',  @overwrite_S3_backup_file=0</code></p>
  <p>I get the error:</p>
  <p>[2022-03-09 12:46:22.053] Aborted the task because of a task failure or an overlap with your preferred backup window for RDS automated backup. [2022-03-09 12:46:22.057] Task has been aborted [2022-03-09 12:46:22.060] Error making request with Error Code MovedPermanently and Http Status Code MovedPermanently. No further error information was returned by the service.</p>
  <p>Please help me</p>