How do I make the s3Options:{} warning go away?

I am getting the following warning when I npm run develop:

Warning: S3 configuration options passed at root level of the plugin’s providerOptions is deprecated and will be removed in a future release. Please wrap them inside the ‘s3Options:{}’ property.

I’ve already moved all the options away from the root level, so I’m not sure what’s going on. Can someone help?

This is what my code looks like:

3 Likes

+1: Same warning here.

1 Like

I have the same issue and figured out the root course. It’s an issue in the plugin’s code, so a filed a bug report here: Unnecessary warning for AWS S3 provider plugin · Issue #16360 · strapi/strapi · GitHub

2 Likes
  upload: {
    config: {
      provider: "aws-s3",
      providerOptions: {
        s3Options: {
          credentials: {
            accessKeyId: env("AWS_ACCESS_KEY_ID"),
            secretAccessKey: env("AWS_SECRET_ACCESS_KEY"),
          },
          region: env("AWS_REGION"),
          params: {
            ACL: env("AWS_ACL", "public-read"),
            signedUrlExpires: env("AWS_SIGNED_URL_EXPIRES", 15 * 60),
            Bucket: env("AWS_BUCKET_NAME"),
          },
        },
      },
    },
  }