小编Ben*_*Ben的帖子

S3 创建 CloudFormation 导致 400 Bad Request

使用 CloudFormation 创建 S3 存储桶时遇到此问题。我收到一个 400 Bad 的请求。如果有人可以提供帮助,将不胜感激。

aws cloudformation deploy --profile DEV --stack-name testBucket --template-file create_bucket.yml --region us-east-1 --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM --parameter-overrides BucketName=myBucket

模板:

    AWSTemplateFormatVersion: 2010-09-09
    Parameters:
      BucketName:
        Description: Provisioned read throughput for each table
        Type: String
    Resources:
      MYBUCKET:
        Type: AWS::S3::Bucket
        Properties:
          BucketName: ${BucketName}
      MYBUCKETPOLICY:
        Type: AWS::S3::BucketPolicy
        Properties:
          Bucket: !Ref MYBUCKET
          PolicyDocument:
            Id: ReportPolicy
            Version: "2012-10-17"
            Statement:
              - Sid: ReportBucketPolicyDoc
                Effect: Allow
                Action: "s3:*"
                Principal:
                  AWS: !Join ['', ["arn:aws:iam::", !Ref "AWS::AccountId", ":root"]]
                Resource: !Join ['', ['arn:aws:s3:::', !Ref MYBUCKET, '/*']] …
Run Code Online (Sandbox Code Playgroud)

amazon-s3 aws-cloudformation

10
推荐指数
2
解决办法
3586
查看次数

标签 统计

amazon-s3 ×1

aws-cloudformation ×1