title: Serverless S3 bucket custom configuration setup
body: <p>Can anyone tell me what is wrong with the below yaml for a custom bucket configuration. I have followed the serverless docs and the AWS docs, but still can't find what I'm doing wrong (copied provider section as I'm getting no warnings from anywhere else).</p>
  <pre><code>provider:
    name: aws
    runtime: java11
    region: ap-southeast-2
    stage: &quot;${opt:stage, 'dev'}&quot;
    architecture: &quot;arm64&quot;
    environment:
      REGION: &quot;${self:provider.region}&quot;
    s3:
      bucketOne:
        accessControl: Private
        bucketName: &quot;${self:custom.config.bucket}&quot;
        bucketEncryption:
          ServerSideEncryptionConfiguration:
            - ServerSideEncryptionByDefault:
                SSEAlgorithm: &quot;AES256&quot;
        lifecycleConfiguration:
          Rules:
            - Status: Enabled
              Prefix: &quot;${self:custom.config.incoming}&quot;
              ExpirationInDays: 30
              NoncurrentVersionExpiration:
                NoncurrentDays: 30
        ownershipControls:
          Rules:
            - ObjectOwnership: BucketOwnerPreferred
        publicAccessBlockConfiguration:
          BlockPublicAcls: true
          BlockPublicPolicy: true
          IgnorePublicAcls: true
          RestrictPublicBuckets: true
        tags:
          - Key: &quot;BillingTag&quot;
            Value: &quot;internal&quot;
          - Key: &quot;stack&quot;
            Value: &quot;s3&quot;
          - Key: &quot;costcentre&quot;
            Value: &quot;${self:custom.config.costCentre}&quot;
        versioningConfiguration:
          Status: Enabled
  </code></pre>
  <p>I am getting the following warnings:</p>
  <pre><code>Warning: Invalid configuration encountered
        at 'provider.s3.bucketOne': unrecognized property 'OwnershipControls'
        at 'provider.s3.bucketOne.lifecycleConfiguration.Rules.0': unrecognized property 'NoncurrentVersionExpiration'
  </code></pre>