Skip to content

Commit

Permalink
fix(delete default vpc): client overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
SizZiKe committed Mar 1, 2024
1 parent c1a4b53 commit f76beea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/aft_lambda/aft_feature_options/aft_delete_default_vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ def lambda_handler(event: Dict[str, Any], context: LambdaContext) -> None:
"Deleting default VPC for AFT management account in region "
+ region
)
session = boto3.session.Session(region_name=region)
client = session.client("ec2")
client = target_account_session.client("ec2", region_name=region)
vpc = get_default_vpc(client)
if vpc is not None:
resource: EC2ServiceResource = boto3.resource(
Expand Down

0 comments on commit f76beea

Please sign in to comment.