System Manager output to s3 bucket

0

I have a maintenance window setup in System Manager that I'm trying to write output to a S3 bucket in same account. But nothing is showing up. Here's the policy I had in place. I'm assuming its not correct, so what do I need to have instead?

{

"Sid": "AWSSSMWrite",

"Effect": "Allow",

"Principal": {

"AWS": "arn:aws-us-gov:iam::<acct#>:root"

},

"Action": "s3:PutObject",

"Resource": "arn:aws-us-gov:s3:::prod-ssm/Patching/*",

"Condition": {

"StringEquals": {

"s3:x-amz-acl": "bucket-owner-full-control"

}

}

}

4개 답변
0
수락된 답변

Bucket policy should like as below:

 {
     "Version": "2012-10-17",
     "Statement": [
         {
             "Sid": "SSMLogging",
             "Effect": "Allow",
             "Principal": {
                 "AWS": "arn:aws:iam::SSM_account_id:root"
             },
             "Action": [
                 "s3:PutObjectAcl",
                 "s3:PutObject",
                 "s3:GetEncryptionConfiguration"
             ],
             "Resource": [
                 "arn:aws:s3:::bucket_name/*",
                 "arn:aws:s3:::bucket_name"
             ]
         }
     ]
 }

IAM Policy should be as below(for systems manager):

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:PutObjectAcl",
                "s3:GetEncryptionConfiguration"
            ],
            "Resource": [
                "arn:aws:s3:::bucket-name/*",
                "arn:aws:s3:::bucket-name"
            ]
        }
    ]
}

Follow this re:Post step by step.

profile pictureAWS
전문가
답변함 10달 전
  • The IAM policy goes on the EC2 service role that's configured for the maintenance window, correct?

  • Yes, that's correct.

  • Did you try it out, let me know how it works for you.

  • Did you try it out?

0

Tried it out, but still doesn't seem to be working

답변함 10달 전
  • Please follow this re:Post step by step and let me know how it goes. Please mention the error messages if you are able to capture through cloudtrail or cloudwatch.

  • How did it go?

0

Hi, unfortunately, no it still did not work.

답변함 10달 전
0

Had to also allow permissions due to KMS encryption, but after allowing that; was able to get the data in the bucket.

답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠