小编Moh*_*ind的帖子

在 YAML 文件中为 S3 存储桶设置生命周期配置

我正在尝试为我的 S3 存储桶设置生命周期配置以在 90 天后过期。但是,在推送我的 CFT 堆栈时,我收到一条错误消息,提示“属性状态不能为空”。

我尝试设置生活方式配置,并将到期日设置为几天,但似乎失败了。

AWSTemplateFormatVersion: '2010-09-09'
Description: Creates S3 Bucket

Resources:
 TestBucket:
 Type: AWS::S3::Bucket
 Properties:
   BucketName: !Sub "${AWS::StackName}-test"
   AccessControl: Private
   LifecycleConfiguration:
    Rules:
    - Id: DeleteContentAfter90Days
      Prefix: ''
      Status: Enabled
      ExpirationInDays: '90'
Run Code Online (Sandbox Code Playgroud)

当我在控制台中检查我的状态时,我收到“属性状态不能为空”和更新回滚。

amazon-s3 amazon-web-services

5
推荐指数
2
解决办法
8491
查看次数

如何在Python中将输出格式化为2个小数位?

我正在尝试将输出格式设置为Python中的两位小数位..这是我的代码

def introduction():
    print("This calculator calculates either the Simple or Compound interest of an given amount")
    print("Please enter the values for principal, annual percentage, number of years, and number of times compounded per year")
    print("With this information, we can provide the Simple or Compound interest as well as your future amount")

def validateInput(principal, annualPercntageRate, numberOfYears,userCompound):
    if principal < 100.00:
        valid = False
    elif annualPercntageRate < 0.001 or annualPercntageRate > .15:
        valid = False
    elif numberOfYears < 1:
        valid = False …
Run Code Online (Sandbox Code Playgroud)

python decimal

-2
推荐指数
1
解决办法
6273
查看次数

标签 统计

amazon-s3 ×1

amazon-web-services ×1

decimal ×1

python ×1