조건 키 사용 - Amazon ElastiCache

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

조건 키 사용

IAM 정책이 적용되는 방식을 결정하는 조건을 지정할 수 있습니다. 에서 JSON 정책의 Condition 요소를 사용하여 요청 컨텍스트의 키를 정책에 지정한 키 값과 비교할 ElastiCache수 있습니다. 자세한 내용은 IAM JSON 정책 요소: 조건 을 참조하세요.

ElastiCache 조건 키 목록을 보려면 서비스 승인 참조Amazon용 조건 키를 참조하세요 ElastiCache.

글로벌 조건 키의 목록은 AWS 글로벌 조건 컨텍스트 키를 참조하세요.

조건 지정: 조건 키 사용

세분화된 제어를 구현하려면 특정 요청에서 개별 파라미터 세트를 제어하는 조건을 지정하는 IAM 권한 정책을 작성합니다. 그런 다음 IAM 콘솔을 사용하여 생성한 IAM 사용자, 그룹 또는 역할에 정책을 적용합니다.

조건을 적용하려면 IAM 정책 문에 조건 정보를 추가합니다. 다음 예제에서는 생성된 모든 자체 설계 캐시 클러스터가 cache.r5.large 노드 유형이 되도록 조건을 지정합니다.

다음은 Valkey 또는 Redis를 사용할 때 이 권한 정책의 예를 보여줍니다OSS.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "StringEquals": { "elasticache:CacheNodeType": [ "cache.r5.large" ] } } } ] }

다음은 Memcached를 사용할 때 이 권한 정책의 예를 보여줍니다.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*" ], "Condition": { "StringEquals": { "elasticache:CacheNodeType": [ "cache.r5.large" ] } } } ] }

자세한 내용은 ElastiCache 리소스 태그 지정 단원을 참조하십시오.

정책 조건 연산자 사용에 대한 자세한 내용은 ElastiCache API 권한: 작업, 리소스 및 조건 참조 섹션을 참조하세요.

정책 예: 조건을 사용하여 세부적인 파라미터 제어 구현

이 섹션에서는 이전에 나열된 ElastiCache 파라미터에 대해 세분화된 액세스 제어를 구현하기 위한 정책의 예를 보여줍니다.

  1. elasticache:MaximumDataStorage: 서버리스 캐시의 최대 데이터 스토리지를 지정합니다. 고객은 제공된 조건을 사용할 때 특정 양의 데이터보다 많이 저장할 수 있는 캐시는 생성할 수 없습니다.

    { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowDependentResources", "Effect": "Allow", "Action": [ "elasticache:CreateServerlessCache" ], "Resource": [ "arn:aws:elasticache:*:*:serverlesscachesnapshot:*", "arn:aws:elasticache:*:*:snapshot:*", "arn:aws:elasticache:*:*:usergroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateServerlessCache" ], "Resource": [ "arn:aws:elasticache:*:*:serverlesscache:*" ], "Condition": { "NumericLessThanEquals": { "elasticache:MaximumDataStorage": "30" }, "StringEquals": { "elasticache:DataStorageUnit": "GB" } } } ] }
  2. elasticache:M aximumECPUPerSecond : 서버리스 캐시의 초ECPU당 최대값을 지정합니다. 제공된 조건을 사용하면 고객은 특정 초ECPUs당 수를 초과하여 실행할 수 있는 캐시를 생성할 수 없습니다.

    { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowDependentResources", "Effect": "Allow", "Action": [ "elasticache:CreateServerlessCache" ], "Resource": [ "arn:aws:elasticache:*:*:serverlesscachesnapshot:*", "arn:aws:elasticache:*:*:snapshot:*", "arn:aws:elasticache:*:*:usergroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateServerlessCache" ], "Resource": [ "arn:aws:elasticache:*:*:serverlesscache:*" ], "Condition": { "NumericLessThanEquals": { "elasticache:MaximumECPUPerSecond": "100000" } } } ] }
  3. elasticache:CacheNodeType: 사용자가 생성할 수 있는 NodeType(s)를 지정합니다. 제공된 조건을 사용하여 고객은 노드 유형에 대해 단일 또는 범위 값을 지정할 수 있습니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "StringEquals": { "elasticache:CacheNodeType": [ "cache.t2.micro", "cache.t2.medium" ] } } } ] }
  4. elasticache:CacheNodeType: Memcached를 사용하여 사용자가 생성할 수 있는 NodeType(s)를 지정합니다. 제공된 조건을 사용하여 고객은 노드 유형에 대해 단일 또는 범위 값을 지정할 수 있습니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*" ], "Condition": { "StringEquals": { "elasticache:CacheNodeType": [ "cache.t2.micro", "cache.t2.medium" ] } } } ] }
  5. elasticache:NumNodeGroups: 노드 그룹이 20개 미만인 복제 그룹을 생성합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "NumericLessThanEquals": { "elasticache:NumNodeGroups": "20" } } } ] }
  6. elasticache:ReplicasPerNodeGroup: 노드당 복제본을 5~10개로 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "NumericGreaterThanEquals": { "elasticache:ReplicasPerNodeGroup": "5" }, "NumericLessThanEquals": { "elasticache:ReplicasPerNodeGroup": "10" } } } ] }
  7. elasticache:EngineVersion: 엔진 버전 5.0.6의 사용량을 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "StringEquals": { "elasticache:EngineVersion": "5.0.6" } } } ] }
  8. elasticache:EngineVersion: Memcached 엔진 버전 1.6.6의 사용량 지정

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*" ], "Condition": { "StringEquals": { "elasticache:EngineVersion": "1.6.6" } } } ] }
  9. elasticache:EngineType: Valkey 또는 Redis OSS 엔진만 사용하여 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "StringEquals": { "elasticache:EngineType": "redis" } } } ] }
  10. elasticache:AtRestEncryptionEnabled: 암호화가 활성화된 상태에서만 복제 그룹을 생성하도록 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "Bool": { "elasticache:AtRestEncryptionEnabled": "true" } } } ] }
  11. elasticache:TransitEncryptionEnabled

    1. 를 사용하지 TLS 않을 때만 복제 그룹을 생성할 수 있도록 지정하려면 CreateReplicationGroup 작업에 false 대한 elasticache:TransitEncryptionEnabled 조건 키를 로 설정합니다.

      { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "Bool": { "elasticache:TransitEncryptionEnabled": "false" } } } ] }

      CreateReplicationGroup 작업의 정책false에서 elasticache:TransitEncryptionEnabled 조건 키가 로 설정된 경우 TLS가 사용되지 않는 경우에만 요청이 허용됩니다(즉, CreateReplicationGroup 요청에 로 설정된 TransitEncryptionEnabled 파라미터 true 또는 로 설정된 TransitEncryptionMode 파라미터가 포함되지 않는 경우에만 허용됩니다required.

    2. 를 사용할 때만 복제 그룹을 생성할 수 있도록 지정하려면 CreateReplicationGroup 작업을 true 위한 elasticache:TransitEncryptionEnabled 컨디턴 키를 TLS로 설정합니다.

      { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "Bool": { "elasticache:TransitEncryptionEnabled": "true" } } } ] }

      CreateReplicationGroup 작업 정책true에서 elasticache:TransitEncryptionEnabled 조건 키가 로 설정된 경우 CreateReplicationGroup 요청에 로 설정된 TransitEncryptionEnabled 파라미터trueTransitEncryptionMode 로 설정된 파라미터가 포함된 경우에만 요청이 허용됩니다required.

    3. 를 TLS 사용할 때만 복제 그룹을 수정할 수 있도록 지정하려면 ModifyReplicationGroup 작업을 elasticache:TransitEncryptionEnabled true 로 설정합니다.

      { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:ModifyReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "BoolIfExists": { "elasticache:TransitEncryptionEnabled": "true" } } } ] }

      ModifyReplicationGroup 작업 정책true에서 elasticache:TransitEncryptionEnabled 조건 키가 로 설정된 경우 ModifyReplicationGroup 요청에 로 설정된 TransitEncryptionMode 파라미터가 포함된 경우에만 요청이 허용됩니다required. 로 설정된 TransitEncryptionEnabled 파라미터도 선택적으로 포함될 true 수 있지만 이 경우 를 활성화할 필요는 없습니다TLS.

  12. elasticache:AutomaticFailoverEnabled: 자동 장애 조치가 활성화된 상태에서만 복제 그룹을 생성하도록 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "Bool": { "elasticache:AutomaticFailoverEnabled": "true" } } } ] }
  13. elasticache:M ultiAZEnabled: 다중 AZ가 비활성화된 상태에서 복제 그룹을 생성할 수 없도록 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Deny", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "Bool": { "elasticache:MultiAZEnabled": "false" } } } ] }
  14. elasticache:ClusterModeEnabled: 클러스터 모드가 활성화된 상태에서만 복제 그룹을 생성할 수 있도록 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "Bool": { "elasticache:ClusterModeEnabled": "true" } } } ] }
  15. elasticache:AuthTokenEnabled: AUTH 토큰이 활성화된 상태에서만 복제 그룹을 생성할 수 있도록 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "Bool": { "elasticache:AuthTokenEnabled": "true" } } } ] }
  16. elasticache:SnapshotRetentionLimit: 스냅샷을 유지할 일수(또는 최소/최대)를 지정합니다. 아래 정책은 최소 30일 동안 백업을 저장하도록 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup", "elasticache:CreateServerlessCache" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*", "arn:aws:elasticache:*:*:serverlesscache:*" ], "Condition": { "NumericGreaterThanEquals": { "elasticache:SnapshotRetentionLimit": "30" } } } ] }
  17. elasticache:KmsKeyId: 고객 관리 AWS KMS형 키의 사용량을 지정합니다.

    { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowDependentResources", "Effect": "Allow", "Action": [ "elasticache:CreateServerlessCache" ], "Resource": [ "arn:aws:elasticache:*:*:serverlesscachesnapshot:*", "arn:aws:elasticache:*:*:snapshot:*", "arn:aws:elasticache:*:*:usergroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateServerlessCache" ], "Resource": [ "arn:aws:elasticache:*:*:serverlesscache:*" ], "Condition": { "StringEquals": { "elasticache:KmsKeyId": "my-key" } } } ] }
  18. elasticache:CacheParameterGroupName: 클러스터에 있는 조직의 특정 파라미터를 사용하여 기본이 아닌 파라미터 그룹을 지정합니다. 파라미터 그룹에 대한 이름 지정 패턴을 지정하거나 특정 파라미터 그룹 이름에 대한 블록 삭제를 지정할 수도 있습니다. 다음은 “my-org-param-group”만 사용하는 제약의 예입니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*", "arn:aws:elasticache:*:*:replicationgroup:*" ], "Condition": { "StringEquals": { "elasticache:CacheParameterGroupName": "my-org-param-group" } } } ] }
  19. elasticache:CacheParameterGroupName: Memcached를 사용하여 클러스터에 있는 조직의 특정 파라미터가 있는 기본이 아닌 파라미터 그룹을 지정합니다. 파라미터 그룹에 대한 이름 지정 패턴을 지정하거나 특정 파라미터 그룹 이름에 대한 블록 삭제를 지정할 수도 있습니다. 다음은 “my-org-param-group”만 사용하는 제약의 예입니다.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*" ], "Condition": { "StringEquals": { "elasticache:CacheParameterGroupName": "my-org-param-group" } } } ] }
  20. elasticache:CreateCacheCluster: 요청 태그Project가 누락되었거나 Dev, QA 또는 와 같지 않은 경우 CreateCacheCluster 작업 거부Prod.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*", "arn:aws:elasticache:*:*:securitygroup:*", "arn:aws:elasticache:*:*:replicationgroup:*" ] }, { "Effect": "Deny", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*" ], "Condition": { "Null": { "aws:RequestTag/Project": "true" } } }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:AddTagsToResource" ], "Resource": "arn:aws:elasticache:*:*:cluster:*", "Condition": { "StringEquals": { "aws:RequestTag/Project": [ "Dev", "Prod", "QA" ] } } } ] }
  21. elasticache:CacheNodeType: CreateCacheCluster cacheNodeType cache.r5.large 또는 cache.r6g.4xlarge 및 태그로 허용Project=XYZ.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster", "elasticache:CreateReplicationGroup" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*" ], "Condition": { "StringEqualsIfExists": { "elasticache:CacheNodeType": [ "cache.r5.large", "cache.r6g.4xlarge" ] }, "StringEquals": { "aws:RequestTag/Project": "XYZ" } } } ] }
  22. elasticache:CacheNodeType: CreateCacheCluster cacheNodeType cache.r5.large 또는 cache.r6g.4xlarge 및 태그로 허용Project=XYZ.

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:parametergroup:*", "arn:aws:elasticache:*:*:subnetgroup:*" ] }, { "Effect": "Allow", "Action": [ "elasticache:CreateCacheCluster" ], "Resource": [ "arn:aws:elasticache:*:*:cluster:*" ], "Condition": { "StringEqualsIfExists": { "elasticache:CacheNodeType": [ "cache.r5.large", "cache.r6g.4xlarge" ] }, "StringEquals": { "aws:RequestTag/Project": "XYZ" } } } ] }
참고

태그와 다른 조건 키를 함께 적용하기 위한 정책을 생성할 때 --tags 파라미터가 있는 생성 요청청에 대한 별도의 elasticache:AddTagsToResource 정책 요구 사항으로 인해 조건 키 요소에서 조건부 IfExists가 필요할 수 있습니다.