title: How to add a lifecycle policy to an existing S3 bucket in AWS CDK Typescript
body: <p>I have imported an S3 bucket using below</p>
  <pre><code>const importbucket = s3.Bucket.fromBucketAttributes(this, 'ImportedBucket', {
    bucketArn: 'arn:aws:s3:::BUCKETNAME'
  });
  </code></pre>
  <p>now I am trying to add lifecycle rule,</p>
  <p>if the bucket is created in the stack I know we have 2 options like below</p>
  <p>option 1 :</p>
  <pre><code>const nitinbucket = new s3.Bucket(this, 'bucket', {
    bucketName: 'sdasbktjsdhfksajdkdjlkas',
    removalPolicy: RemovalPolicy.DESTROY,
    versioned: false, 
  });
  
  nitinbucket.addLifecycleRule({
    abortIncompleteMultipartUploadAfter: Duration.days(7),
    enabled: true,
    expiration: Duration.days(75),
    id: 'rule',
  });
  </code></pre>
  <p>Option 2:</p>
  <pre><code>const myBucket = new s3.Bucket(this, 'BuckyMcBucketface', {
    lifecycleRules: [
        {
            transitions: [
                {
                    storageClass: s3.StorageClass.INFREQUENT_ACCESS,
                    transitionAfter: cdk.Duration.days(30),
                },
            ],
        },
    ],
  });
  </code></pre>
  <p>what I want is import an existing bucket and add transition rules to the bucket (similar to option 2)</p>
  <p>Thanks !</p>