Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
add missing endpoints for StepFunctions startup command
Browse files Browse the repository at this point in the history
  • Loading branch information
whummer committed May 6, 2021
1 parent f522dfb commit 0dc1b99
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions localstack/services/cloudformation/service_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ def fetch_state(self, stack_name, resources):
group_name = self.resolve_refs_recursively(stack_name, props.get('LogGroupName'), resources)
filter_pattern = self.resolve_refs_recursively(stack_name, props.get('FilterPattern'), resources)
logs = aws_stack.connect_to_service('logs')
groups = logs.describe_subscription_filters(logGroupName=group_name)
groups = [g for g in groups['subscriptionFilters'] if g.get('filterPattern') == filter_pattern]
groups = logs.describe_subscription_filters(logGroupName=group_name)['subscriptionFilters']
groups = [g for g in groups if g.get('filterPattern') == filter_pattern]
return (groups or [None])[0]

@staticmethod
Expand Down
2 changes: 2 additions & 0 deletions localstack/services/route53/route53_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def _zone(z):
response = requests_response(body)
return response

if '/delegationset' in path:
pass

# instantiate listener
UPDATE_ROUTE53 = ProxyListenerRoute53()
21 changes: 13 additions & 8 deletions localstack/services/stepfunctions/stepfunctions_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@


def get_command(backend_port):
dynamodb_endpoint = aws_stack.get_local_service_url('dynamodb')
sns_endpoint = aws_stack.get_local_service_url('sns')
sqs_endpoint = aws_stack.get_local_service_url('sqs')
sfn_endpoint = aws_stack.get_local_service_url('stepfunctions')
cmd = ('cd %s; PORT=%s java -Dcom.amazonaws.sdk.disableCertChecking -Xmx%s -jar StepFunctionsLocal.jar '
'--dynamodb-endpoint %s --sns-endpoint %s '
'--sqs-endpoint %s --aws-region %s --aws-account %s --step-functions-endpoint %s') % (
install.INSTALL_DIR_STEPFUNCTIONS, backend_port, MAX_HEAP_SIZE, dynamodb_endpoint,
sns_endpoint, sqs_endpoint, aws_stack.get_region(), TEST_AWS_ACCOUNT_ID, sfn_endpoint)
'--aws-region %s --aws-account %s') % (
install.INSTALL_DIR_STEPFUNCTIONS, backend_port, MAX_HEAP_SIZE,
aws_stack.get_region(), TEST_AWS_ACCOUNT_ID)
if config.STEPFUNCTIONS_LAMBDA_ENDPOINT.lower() != 'default':
lambda_endpoint = config.STEPFUNCTIONS_LAMBDA_ENDPOINT or aws_stack.get_local_service_url('lambda')
cmd += (' --lambda-endpoint %s') % (lambda_endpoint)
# add service endpoint flags
services = ['athena', 'batch', 'dynamodb', 'ecs', 'eks', 'glue', 'sagemaker', 'sns', 'sqs', 'stepfunctions']
for service in services:
flag = '--%s-endpoint' % service
if service == 'stepfunctions':
flag = '--step-functions-endpoint'
elif service in ['athena', 'eks']:
flag = '--step-functions-%s' % service
endpoint = aws_stack.get_local_service_url(service)
cmd += ' %s %s' % (flag, endpoint)
return cmd


Expand Down

0 comments on commit 0dc1b99

Please sign in to comment.