cdk-emrserverless-with-delta-lake
Version:
A construct for the quick demo of EMR Serverless.
94 lines (93 loc) • 3.11 kB
TypeScript
import * as iam from 'aws-cdk-lib/aws-iam';
import * as s3 from 'aws-cdk-lib/aws-s3';
import { Construct } from 'constructs';
import { EmrStudioDeveloperStackProps } from './emr-studio-cluster-templates';
export interface EmrServerlessProps {
/**
* Used by the EMR Studio.
*
* @default - 'The default VPC will be used.'
*/
readonly vpcId?: string;
/**
* The subnet IDs for the EMR studio.
* You can select the subnets from the default VPC in your AWS account.
*/
readonly subnetIds?: Array<string>;
/**
* Options for which kind of identity will be associated with the Product of the Porfolio in AWS Service Catalog for EMR cluster templates.
*
* You can choose either an IAM group, IAM role, or IAM user. If you leave it empty, an IAM user named `Administrator` with the `AdministratorAccess` power needs to be created first.
*/
readonly serviceCatalogProps?: EmrStudioDeveloperStackProps;
}
/**
* Creates an EMR Studio, an EMR cluster template for the studio, and an EMR Serverless application.
*
* ```ts
* // the quickiest deployment
* new EmrServerless(this, 'EmrServerless');
*
* // custom deployment references
* new EmrServerless(this, 'EmrServerless', {
* vpcId: 'vpc-idididid',
* });
*
* new EmrServerless(this, 'EmrServerless', {
* vpcId: 'vpc-idididid',
* subnetIds: ['subnet-eeeee', 'subnet-fffff']
* });
*
* const myRole = new iam.Role.fromRoleName('MyRole');
* new EmrServerless(this, 'EmrServerless', {
* serviceCatalogProps: {
* role: myRole
* }
* });
*
* const myUser = new iam.Role.fromUserName('MyUser');
* new EmrServerless(this, 'EmrServerless', {
* vpcId: 'vpc-idididid',
* subnetIds: ['subnet-eeeee', 'subnet-fffff'],
* serviceCatalogProps: {
* user: myUser
* }
* });
*
* const myGroup = new iam.Group.fromGroupName('MyGroup');
* new EmrServerless(this, 'EmrServerless', {
* serviceCatalogProps: {
* group: myGroup
* }
* });
* ```
*/
export declare class EmrServerless extends Construct {
constructor(scope: Construct, name: string, props?: EmrServerlessProps);
}
/**
* Options for the execution job role of EMR Serverless.
*/
export interface ServerlessJobRoleProps {
/**
* The EMR Serverless bucket.
*/
readonly emrServerlessBucket: s3.Bucket;
}
/**
* Creates an execution job role for EMR Serverless.
*
* For detail, please refer to [Create a job runtime role](https://docs.aws.amazon.com/emr/latest/EMR-Serverless-UserGuide/getting-started.html#gs-runtime-role).
*
* ```ts
* const emrServerlessBucket = new EmrServerlessBucket(this, 'EmrServerlessStorage');
* const emrServerlessJobRole = new ServerlessJobRole(this, 'EmrServerlessJob', {emrServerlessBucket: emrServerlessBucket});
* ```
*/
export declare class ServerlessJobRole extends Construct {
/**
* The representative of the execution role for EMR Serverless.
*/
readonly entity: iam.Role;
constructor(scope: Construct, name: string, props: ServerlessJobRoleProps);
}