

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 範例：WorkSpaces 應用程式彈性機群工作階段指令碼 Amazon S3 儲存貯體政策跨服務混淆代理人預防
<a name="example-elastic-fleets"></a>

**Example `aws:SourceAccount` 條件式：**    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": [
                    "appstream.amazonaws.com"
                ]
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::{{your-bucket-name}}/{{your-session-script-path}}",
            "Condition": {
                "StringEquals": {
                    "aws:SourceAccount": "{{your AWS 帳戶 ID}}"
                } 
            }
        }
    ]
}
```

**Example `aws:SourceArn` 條件式：**    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": [
                    "appstream.amazonaws.com"
                ]
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::{{bucket}}/{{AppStream2}}/*",
            "Condition": {
                "ArnLike": {
                "aws:SourceArn": "arn:aws:appstream:us-east-1:111122223333:fleet/{{yourFleetName}}"
                }
            }
        }
    ]
}
```