Pulumi s3 lifecycle_rule configuration

29 Views Asked by At

I am using python and pulumi, and i am trying to add lifecycle_rules, 30 to IA and 90 to Glacier to this s3 bucket, but it throws this error:** got an unexpected keyword argument 'lifecycle_rules' **

I followed the instructions on pulumis own website examples, so I don't quite understand what I am doing wrong. Appreciate any help !

This is my code :

my_backups_s3 = s3.example_S3_Bucket(
            my_deployment + "-s3-" + "backups",
            s3.S3_Bucket_Args(
                default_tags={
                    "Classification": "-",
                    "Owner": "-",
                    **my_default_tags},
                logging_bucket=logs_bucket.s3_bucket.bucket,
                cwmonitoring=True
            ),
            lifecycle_rules=[
                aws.s3.BucketLifecycleRuleArgs(
                    enabled=True,
                    id="log",
                    prefix="",
                    tags={
                        "Classification": "-",
                        "Owner": "-",
                    },
                    transitions=[
                        aws.s3.BucketLifecycleRuleTransitionArgs(
                            days=30,
                            storage_class="STANDARD_IA",
                        ),
                        aws.s3.BucketLifecycleRuleTransitionArgs(
                            days=90,
                            storage_class="GLACIER",
                        ),
                    ],
                ),
            ])
        
0

There are 0 best solutions below