Skip to content

Commit

Permalink
Step Functions - Remove STS-client and refer to hardcoded account-id
Browse files Browse the repository at this point in the history
  • Loading branch information
bblommers committed Sep 24, 2019
1 parent 6a1a8df commit 38455c8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions moto/stepfunctions/models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import boto
import boto3
import re
from datetime import datetime
from moto.core import BaseBackend
from moto.core.utils import iso_8601_datetime_without_milliseconds
from moto.sts.models import ACCOUNT_ID
from uuid import uuid4
from .exceptions import ExecutionDoesNotExist, InvalidArn, InvalidName, StateMachineDoesNotExist

Expand Down Expand Up @@ -156,12 +156,7 @@ def _validate_arn(self, arn, regex, invalid_msg):
raise InvalidArn(invalid_msg)

def _get_account_id(self):
if self._account_id:
return self._account_id
sts = boto3.client("sts")
identity = sts.get_caller_identity()
self._account_id = identity['Account']
return self._account_id
return ACCOUNT_ID


stepfunction_backends = {_region.name: StepFunctionBackend(_region.name) for _region in boto.awslambda.regions()}

0 comments on commit 38455c8

Please sign in to comment.