Skip to content

Commit

Permalink
Fix deprecation warning for applyAspect
Browse files Browse the repository at this point in the history
The API @aws-cdk/core.ConstructNode.applyAspect is deprecated:
Use "Aspects.of(construct).add(aspect)" instead. This API will
be removed in the next major release
  • Loading branch information
chuckwondo committed Oct 3, 2023
1 parent e55764a commit f641b68
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions stack/stack.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import json
import os

from aws_cdk import (
aws_events,
aws_events_targets,
aws_iam,
aws_lambda,
aws_s3,
aws_sns,
aws_ssm,
aws_stepfunctions,
core,
)
from hlsconstructs.batch import Batch
Expand Down Expand Up @@ -136,7 +132,7 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
).string_value
from permission_boundary import PermissionBoundaryAspect

self.node.apply_aspect(PermissionBoundaryAspect(boundary_arn))
core.Aspects.of(self).add(PermissionBoundaryAspect(boundary_arn))
else:
vpcid = None
image_id = None
Expand Down

0 comments on commit f641b68

Please sign in to comment.