EMR clusters must reference an EMR security configuration so cluster-level security settings (such as encryption and authentication controls) are applied. Without a security configuration, data at rest or in transit and access controls may not be enforced, increasing the risk of data exposure or unauthorized access.
In CloudFormation, the SecurityConfiguration property on AWS::EMR::Cluster must be defined and set to the logical name (string) of a resource of type AWS::EMR::SecurityConfiguration. Resources missing this property, or where the SecurityConfiguration value does not match an AWS::EMR::SecurityConfiguration resource in the same template, will be flagged.
AWSTemplateFormatVersion:2010-09-09Parameters:CrossRealmTrustPrincipalPassword:Type:StringKdcAdminPassword:Type:StringRealm:Type:StringInstanceType:Type:StringReleaseLabel:Type:StringSubnetId:Type:StringResources:cluster:Type:'AWS::EMR::Cluster'Properties:Instances:MasterInstanceGroup:InstanceCount:1InstanceType:!Ref InstanceTypeMarket:ON_DEMANDName:cfnMasterCoreInstanceGroup:InstanceCount:1InstanceType:!Ref InstanceTypeMarket:ON_DEMANDName:cfnCoreEc2SubnetId:!Ref SubnetIdName:CFNtest2JobFlowRole:!Ref emrEc2InstanceProfileKerberosAttributes:CrossRealmTrustPrincipalPassword:CfnIntegrationTest-1KdcAdminPassword:CfnIntegrationTest-1Realm:EC2.INTERNALServiceRole:!Ref emrRoleReleaseLabel:!Ref ReleaseLabelSecurityConfiguration:!Ref securityConfigurationVisibleToAllUsers:trueTags:- Key:key1Value:value1key:Type:'AWS::KMS::Key'Properties:KeyPolicy:Version:2012-10-17Id:key-default-1Statement:- Sid:Enable IAM User PermissionsEffect:AllowPrincipal:AWS:!GetAtt- emrEc2Role- ArnAction:'kms:*'Resource:'*'- Sid:Enable IAM User PermissionsEffect:AllowPrincipal:AWS:!Join- ''- - 'arn:aws:iam::'- !Ref 'AWS::AccountId'- ':root'Action:'kms:*'Resource:'*'securityConfiguration:Type:'AWS::EMR::SecurityConfiguration'Properties:SecurityConfiguration:AuthenticationConfiguration:KerberosConfiguration:Provider:ClusterDedicatedKdcClusterDedicatedKdcConfiguration:TicketLifetimeInHours:24CrossRealmTrustConfiguration:Realm:AD.DOMAIN.COMDomain:ad.domain.comAdminServer:ad.domain.comKdcServer:ad.domain.comemrRole:Type:'AWS::IAM::Role'Properties:AssumeRolePolicyDocument:Version:2008-10-17Statement:- Sid:''Effect:AllowPrincipal:Service:elasticmapreduce.amazonaws.comAction:'sts:AssumeRole'Path:/ManagedPolicyArns:- 'arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceRole'emrEc2Role:Type:'AWS::IAM::Role'Properties:AssumeRolePolicyDocument:Version:2008-10-17Statement:- Sid:''Effect:AllowPrincipal:Service:ec2.amazonaws.comAction:'sts:AssumeRole'Path:/ManagedPolicyArns:- 'arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role'emrEc2InstanceProfile:Type:'AWS::IAM::InstanceProfile'Properties:Path:/Roles:- !Ref emrEc2RoleOutputs:keyArn:Value:!GetAtt- key- Arn
AWSTemplateFormatVersion:2010-09-09Description:The cluster references its security configuration with a short-form Ref intrinsicResources:cluster:Type:'AWS::EMR::Cluster'Properties:Instances:Ec2SubnetId:subnet-12345678Name:CFNtestJobFlowRole:EMR_EC2_DefaultRoleServiceRole:EMR_DefaultRoleReleaseLabel:emr-5.0.0SecurityConfiguration:!Ref securityConfigurationVisibleToAllUsers:truesecurityConfiguration:Type:'AWS::EMR::SecurityConfiguration'Properties:SecurityConfiguration:AuthenticationConfiguration:KerberosConfiguration:Provider:ClusterDedicatedKdc
Non-Compliant Code Examples
AWSTemplateFormatVersion:2010-09-09Parameters:CrossRealmTrustPrincipalPassword:Type:StringKdcAdminPassword:Type:StringRealm:Type:StringInstanceType:Type:StringReleaseLabel:Type:StringSubnetId:Type:StringResources:cluster:Type:'AWS::EMR::Cluster'Properties:Instances:MasterInstanceGroup:InstanceCount:1InstanceType:!Ref InstanceTypeMarket:ON_DEMANDName:cfnMasterCoreInstanceGroup:InstanceCount:1InstanceType:!Ref InstanceTypeMarket:ON_DEMANDName:cfnCoreEc2SubnetId:!Ref SubnetIdName:CFNtest2JobFlowRole:!Ref emrEc2InstanceProfileKerberosAttributes:CrossRealmTrustPrincipalPassword:CfnIntegrationTest-1KdcAdminPassword:CfnIntegrationTest-1Realm:EC2.INTERNALServiceRole:!Ref emrRoleReleaseLabel:!Ref ReleaseLabelSecurityConfiguration:!Ref securityConfiguration1VisibleToAllUsers:trueTags:- Key:key1Value:value1key:Type:'AWS::KMS::Key'Properties:KeyPolicy:Version:2012-10-17Id:key-default-1Statement:- Sid:Enable IAM User PermissionsEffect:AllowPrincipal:AWS:!GetAtt- emrEc2Role- ArnAction:'kms:*'Resource:'*'- Sid:Enable IAM User PermissionsEffect:AllowPrincipal:AWS:!Join- ''- - 'arn:aws:iam::'- !Ref 'AWS::AccountId'- ':root'Action:'kms:*'Resource:'*'securityConfiguration:Type:'AWS::EMR::SecurityConfiguration'Properties:SecurityConfiguration:AuthenticationConfiguration:KerberosConfiguration:Provider:ClusterDedicatedKdcClusterDedicatedKdcConfiguration:TicketLifetimeInHours:24CrossRealmTrustConfiguration:Realm:AD.DOMAIN.COMDomain:ad.domain.comAdminServer:ad.domain.comKdcServer:ad.domain.comemrRole:Type:'AWS::IAM::Role'Properties:AssumeRolePolicyDocument:Version:2008-10-17Statement:- Sid:''Effect:AllowPrincipal:Service:elasticmapreduce.amazonaws.comAction:'sts:AssumeRole'Path:/ManagedPolicyArns:- 'arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceRole'emrEc2Role:Type:'AWS::IAM::Role'Properties:AssumeRolePolicyDocument:Version:2008-10-17Statement:- Sid:''Effect:AllowPrincipal:Service:ec2.amazonaws.comAction:'sts:AssumeRole'Path:/ManagedPolicyArns:- 'arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role'emrEc2InstanceProfile:Type:'AWS::IAM::InstanceProfile'Properties:Path:/Roles:- !Ref emrEc2RoleOutputs:keyArn:Value:!GetAtt- key- Arn
AWSTemplateFormatVersion:2010-09-09Parameters:CrossRealmTrustPrincipalPassword:Type:StringKdcAdminPassword:Type:StringRealm:Type:StringInstanceType:Type:StringReleaseLabel:Type:StringSubnetId:Type:StringResources:cluster1:Type:'AWS::EMR::Cluster'Properties:Instances:MasterInstanceGroup:InstanceCount:1InstanceType:!Ref InstanceTypeMarket:ON_DEMANDName:cfnMasterCoreInstanceGroup:InstanceCount:1InstanceType:!Ref InstanceTypeMarket:ON_DEMANDName:cfnCoreEc2SubnetId:!Ref SubnetIdName:CFNtest2JobFlowRole:!Ref emrEc2InstanceProfileKerberosAttributes:CrossRealmTrustPrincipalPassword:CfnIntegrationTest-1KdcAdminPassword:CfnIntegrationTest-1Realm:EC2.INTERNALServiceRole:!Ref emrRoleReleaseLabel:!Ref ReleaseLabelVisibleToAllUsers:trueTags:- Key:key1Value:value1key:Type:'AWS::KMS::Key'Properties:KeyPolicy:Version:2012-10-17Id:key-default-1Statement:- Sid:Enable IAM User PermissionsEffect:AllowPrincipal:AWS:!GetAtt- emrEc2Role- ArnAction:'kms:*'Resource:'*'- Sid:Enable IAM User PermissionsEffect:AllowPrincipal:AWS:!Join- ''- - 'arn:aws:iam::'- !Ref 'AWS::AccountId'- ':root'Action:'kms:*'Resource:'*'emrRole1:Type:'AWS::IAM::Role'Properties:AssumeRolePolicyDocument:Version:2008-10-17Statement:- Sid:''Effect:AllowPrincipal:Service:elasticmapreduce.amazonaws.comAction:'sts:AssumeRole'Path:/ManagedPolicyArns:- 'arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceRole'emrEc2Role1:Type:'AWS::IAM::Role'Properties:AssumeRolePolicyDocument:Version:2008-10-17Statement:- Sid:''Effect:AllowPrincipal:Service:ec2.amazonaws.comAction:'sts:AssumeRole'Path:/ManagedPolicyArns:- 'arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role'emrEc2InstanceProfile1:Type:'AWS::IAM::InstanceProfile'Properties:Path:/Roles:- !Ref emrEc2RoleOutputs:keyArn:Value:!GetAtt- key- Arn
1
2
rulesets:- CloudFormation / AWS # Rules to enforce / AWS.
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.