Skip to content

Commit

Permalink
help aws
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas McDonald committed Oct 26, 2023
1 parent 9f775d9 commit dd2d0be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@
import Wrappers
import boto3

TEST_REGION = "us-west-2"

@staticmethod
def WrappedDdbClient():
impl = boto3.client("dynamodb")
region = boto3.session.Session().region_name
def WrappedDdbClient(region=None):
if region is not None:
boto_config = Config(
region_name=region
)
impl = boto3.client("dynamodb", config=boto_config)
else:
impl = boto3.client("dynamodb", region_name=TEST_REGION)
region = boto3.session.Session().region_name
wrapped_client = DynamoDB_20120810Shim(impl, region)
return Wrappers.Result_Success(wrapped_client)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import boto3
from botocore.config import Config

TEST_REGION = "us-west-2"

class default__(com_amazonaws_kms.internaldafny.generated.software_amazon_cryptography_services_kms_internaldafny.default__):

@staticmethod
def KMSClient(region=None):
if region is not None:
Expand All @@ -16,7 +19,7 @@ def KMSClient(region=None):
)
impl = boto3.client("kms", config=boto_config)
else:
impl = boto3.client("kms")
impl = boto3.client("kms", region_name=TEST_REGION)
region = boto3.session.Session().region_name
wrapped_client = KMSClientShim(impl, region)
return Wrappers.Result_Success(wrapped_client)
Expand Down

0 comments on commit dd2d0be

Please sign in to comment.