How to use start_kms_local method in localstack

Best Python code snippet using localstack_python

kms_starter.py

Source:kms_starter.py Github

copy

Full Screen

...12from localstack.utils.common import get_arch, get_free_tcp_port, wait_for_port_open13LOG = logging.getLogger(__name__)14# KMS provider - can be either "local-kms" or "moto"15KMS_PROVIDER = (os.environ.get("KMS_PROVIDER") or "").strip() or "moto"16def start_kms_local(port=None, backend_port=None, asynchronous=None, update_listener=None):17 port = port or config.PORT_KMS18 backend_port = get_free_tcp_port()19 kms_binary = INSTALL_PATH_KMS_BINARY_PATTERN.replace("<arch>", get_arch())20 log_startup_message("KMS")21 start_proxy_for_service("kms", port, backend_port, update_listener)22 env_vars = {23 "PORT": str(backend_port),24 "KMS_REGION": config.DEFAULT_REGION,25 "REGION": config.DEFAULT_REGION,26 "KMS_ACCOUNT_ID": TEST_AWS_ACCOUNT_ID,27 "ACCOUNT_ID": TEST_AWS_ACCOUNT_ID,28 }29 if config.DATA_DIR:30 env_vars["KMS_DATA_PATH"] = config.DATA_DIR...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful