interface CfnSecurityConfigurationProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EMR.CfnSecurityConfigurationProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsemr#CfnSecurityConfigurationProps |
Java | software.amazon.awscdk.services.emr.CfnSecurityConfigurationProps |
Python | aws_cdk.aws_emr.CfnSecurityConfigurationProps |
TypeScript | aws-cdk-lib » aws_emr » CfnSecurityConfigurationProps |
Properties for defining a CfnSecurityConfiguration.
Example
import * as emr from 'aws-cdk-lib/aws-emr';
const cfnSecurityConfiguration = new emr.CfnSecurityConfiguration(this, 'EmrSecurityConfiguration', {
name: 'AddStepRuntimeRoleSecConfig',
securityConfiguration: JSON.parse(`
{
"AuthorizationConfiguration": {
"IAMConfiguration": {
"EnableApplicationScopedIAMRole": true,
"ApplicationScopedIAMRoleConfiguration":
{
"PropagateSourceIdentity": true
}
},
"LakeFormationConfiguration": {
"AuthorizedSessionTagValue": "Amazon EMR"
}
}
}`),
});
const task = new tasks.EmrCreateCluster(this, 'Create Cluster', {
instances: {},
name: sfn.TaskInput.fromJsonPathAt('$.ClusterName').value,
securityConfiguration: cfnSecurityConfiguration.name,
});
const executionRole = new iam.Role(this, 'Role', {
assumedBy: new iam.ArnPrincipal(task.clusterRole.roleArn),
});
executionRole.assumeRolePolicy?.addStatements(
new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
principals: [
task.clusterRole,
],
actions: [
'sts:SetSourceIdentity',
],
}),
new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
principals: [
task.clusterRole,
],
actions: [
'sts:TagSession',
],
conditions: {
StringEquals: {
'aws:RequestTag/LakeFormationAuthorizedCaller': 'Amazon EMR',
},
},
}),
);
new tasks.EmrAddStep(this, 'Task', {
clusterId: 'ClusterId',
executionRoleArn: executionRole.roleArn,
name: 'StepName',
jar: 'Jar',
actionOnFailure: tasks.ActionOnFailure.CONTINUE,
});
Properties
| Name | Type | Description |
|---|---|---|
| security | any | The security configuration details in JSON format. |
| name? | string | The name of the security configuration. |
securityConfiguration
Type:
any
The security configuration details in JSON format.
For JSON parameters and examples, see Use Security Configurations to Set Up Cluster Security in the Amazon EMR Management Guide .
name?
Type:
string
(optional)
The name of the security configuration.

.NET
Go
Java
Python
TypeScript