From 2adc5f2ace5b48ef95135163b36f8ffadf5c595c Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Wed, 10 May 2017 22:44:57 -0400 Subject: [PATCH] Prefix should not be required for S3 lifecycle config. Closes #930. --- moto/s3/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/s3/models.py b/moto/s3/models.py index 1cf183d56..ec3e69f1b 100644 --- a/moto/s3/models.py +++ b/moto/s3/models.py @@ -281,7 +281,7 @@ class FakeBucket(BaseModel): transition = rule.get('Transition') self.rules.append(LifecycleRule( id=rule.get('ID'), - prefix=rule['Prefix'], + prefix=rule.get('Prefix'), status=rule['Status'], expiration_days=expiration.get('Days') if expiration else None, expiration_date=expiration.get('Date') if expiration else None,