How to combine two same IAM Policies in one if they are target two different resources. One of the resource has Join and Ref. Can below two Policies be merged to single in CloudFormation Template?
- Effect: Allow
Action:
- "s3:DeleteObject"
- "s3:DeleteObjectTagging"
- "s3:GetObjectAcl"
- "s3:GetObjectTagging"
- "s3:PutObject"
- "s3:PutObjectAcl"
- "s3:PutObjectTagging"
Resource:
!Join
- ''
- - 'arn:aws:s3:::'
- !Ref TestBucketName
- '/*'
- Effect: Allow
Action:
- "s3:DeleteObject"
- "s3:DeleteObjectTagging"
- "s3:GetObjectAcl"
- "s3:GetObjectTagging"
- "s3:PutObject"
- "s3:PutObjectAcl"
- "s3:PutObjectTagging"
Resource: "arn:aws:s3:::SecondTestBucket/Download/*"