【发布时间】:2018-08-28 13:14:47
【问题描述】:
我收到一个错误提示
2018 年 3 月 19 日下午 4:40:25 - 模板包含错误。:模板错误:参数“LifecycleConfiguration”MaxLength 必须位于字符串类型的参数上
这是我的代码。
AWSTemplateFormatVersion: 2010-09-09
Description: S3 Bucket Template for cloudformation
Metadata:
Copyright:
- 'Copyrights 2018, All rights reserved'
Comments:
- !Ref Description
Parameters:
S3BucketName:
Description: Name of the S3 Bucket
Type: String
ConstraintDescription: S3 BucketName must be between 3 and 63 characters in length.
MinLength: 3
MaxLength: 63
LifecycleConfiguration:
Description: >-
Specify a number of days to keep files in the bucket, a value of 0 keeps
the files in the s3
Type: Number
MinValue: '0'
MaxLength: '365'
Resources:
S3Bucket:
Type: 'AWS::S3::Bucket'
Properties:
BucketName: !Ref S3BucketName
LifecycleConfiguration:
Rules:
- Id: GlacierRule
Prefix: glacier
Status: Enabled
ExpirationInDays: '365'
Transitions:
- TransitionInDays: '1'
StorageClass: Glacier
【问题讨论】:
标签: amazon-web-services amazon-cloudformation