Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k committed Feb 7, 2024
1 parent 319fcb3 commit 42b6946
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class FakePipeline extends cdk.Resource implements IPipeline {
super(scope, id);
this.pipelineName = props.pipelineName;

const sourceBucket = new Bucket(stack, 'SourceBucket', {
const sourceBucket = new Bucket(scope, 'SourceBucket', {
removalPolicy: cdk.RemovalPolicy.DESTROY,
autoDeleteObjects: true,
});
const outputBucket = new Bucket(stack, 'OutputBucket', {
const outputBucket = new Bucket(scope, 'OutputBucket', {
removalPolicy: cdk.RemovalPolicy.DESTROY,
autoDeleteObjects: true,
});
Expand Down Expand Up @@ -73,12 +73,12 @@ class FakePipeline extends cdk.Resource implements IPipeline {
}),
};

const pipelineRole = new Role(stack, 'SageMakerPipelineRole', {
const pipelineRole = new Role(scope, 'SageMakerPipelineRole', {
assumedBy: new ServicePrincipal('sagemaker.amazonaws.com'),
});
pipelineRole.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName('AmazonSageMakerFullAccess'));

const pipeline = new CfnPipeline(stack, 'Resource', {
const pipeline = new CfnPipeline(scope, 'Resource', {
pipelineName: this.pipelineName,
pipelineDefinition: pipelineDefinition,
roleArn: pipelineRole.roleArn,
Expand Down

0 comments on commit 42b6946

Please sign in to comment.