As a user of localstack I would like a documented standardized way to run terraform scripts against a running localstack to create AWS infrastructure so that I don't have to duplicate work that involves programatically creating the resources when I use terraform to create resources in my cloud environment.
}
    return get_function_version(arn, str(last_version + 1))
def do_list_versions(arn):
    return sorted([get_function_version(arn, version) for version in
                   arn_to_lambda.get(arn).versions.keys()], key=lambda k: str(k.get('Version')))
def do_update_alias(arn, alias, version, description=None):
    new_alias = {
        'AliasArn': arn + ':' + alias,
        'FunctionVersion': version,
        'Name': alias,
        'Description': description or '',
        'RevisionId': str(uuid.uuid4())
    }
    arn_to_lambda.get(arn).aliases[alias] = new_alias
    return new_alias
@cloudwatched('lambda')
def run_lambda(event, context, func_arn, version=None, suppress_output=False, asynchronous=False):
    if suppress_output:
        stdout_ = sys.stdout
        stderr_ = sys.stderr
        stream = StringIO()
        sys.stdout = stream
        sys.stderr = stream
    try:
        func_arn = aws_stack.fix_arn(func_arn)
        func_details = arn_to_lambda.get(func_arn)
        if not func_details:
            return not_found_error(msg='The resource specified in the request does not exist.')
        if not context:
            context = LambdaContext(func_details, version)