Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Step Functions aws-sdk:sfn:sendTaskSuccess returning unknown service 'sfn' #10622

Closed
1 task done
athillairajah opened this issue Apr 9, 2024 · 3 comments
Closed
1 task done
Assignees
Labels
aws:stepfunctions AWS Step Functions status: resolved/stale Closed due to staleness status: response required Waiting for a response from the reporter type: bug Bug report

Comments

@athillairajah
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am executing a state machine that calls a child state machine and uses the built in Send Task Success to call back the parent state machine upon the success of the child state machine.

The parent step function has a step to start the child step function execution and wait for the task token that is defined:

"Step Functions StartExecution - sync import": {
            "Type": "Task",
            "Resource": "arn:aws:states:::states:startExecution.waitForTaskToken",
            "Parameters": {
              "StateMachineArn": "{{serviceSfnSync}}",
              "Input": {
                "TaskToken.$": "$$.Task.Token",
                "service.$": "$",
              }
            },
            "End": true
          }

and the child step function has a step to send the task token back to the parent upon success:

"Send Task Success to root Step Function": {
      "Type": "Task",
      "End": true,
      "Parameters": {
        "Output": "{\"output\": \"success\"}",
        "TaskToken.$": "$$.Execution.Input.TaskToken"
      },
      "Resource": "arn:aws:states:::aws-sdk:sfn:sendTaskSuccess"
    }

When these step functions are run, I get the following error

Stepfunctions computation ended with exception 'UnknownServiceError(Unknown service: 'sfn'. Valid service names are: accessanalyzer, account, acm, acm-pca, alexaforbusiness, amp, amplify, amplifybackend, amplifyuibuilder, apigateway, apigatewaymanagementapi, apigatewayv2, appconfig, appconfigdata, appfabric, appflow, appintegrations, application-autoscaling, application-insights, applicationcostprofiler, appmesh, apprunner, appstream, appsync, arc-zonal-shift, artifact, athena, auditmanager, autoscaling, autoscaling-plans, b2bi, backup, backup-gateway, backupstorage, batch, bcm-data-exports, bedrock, bedrock-agent, bedrock-agent-runtime, bedrock-runtime, billingconductor, braket, budgets, ce, chatbot, chime, chime-sdk-identity, chime-sdk-media-pipelines, chime-sdk-meetings, chime-sdk-messaging, chime-sdk-voice, cleanrooms, cleanroomsml, cloud9, cloudcontrol, clouddirectory, cloudformation, cloudfront, cloudfront-keyvaluestore, cloudhsm, cloudhsmv2, cloudsearch, cloudsearchdomain, cloudtrail, cloudtrail-data, cloudwatch, codeartifact, codebuild, codecatalyst, codecommit, codedeploy, codeguru-reviewer, codeguru-security, codeguruprofiler, codepipeline, codestar, codestar-connections, codestar-notifications, cognito-identity, cognito-idp, cognito-sync, comprehend, comprehendmedical, compute-optimizer, config, connect, connect-contact-lens, connectcampaigns, connectcases, connectparticipant, controltower, cost-optimization-hub, cur, customer-profiles, databrew, dataexchange, datapipeline, datasync, datazone, dax, detective, devicefarm, devops-guru, directconnect, discovery, dlm, dms, docdb, docdb-elastic, drs, ds, dynamodb, dynamodbstreams, ebs, ec2, ec2-instance-connect, ecr, ecr-public, ecs, efs, eks, eks-auth, elastic-inference, elasticache, elasticbeanstalk, elastictranscoder, elb, elbv2, emr, emr-containers, emr-serverless, entityresolution, es, events, evidently, finspace, finspace-data, firehose, fis, fms, forecast, forecastquery, frauddetector, freetier, fsx, gamelift, glacier, globalaccelerator, glue, grafana, greengrass, greengrassv2, groundstation, guardduty, health, healthlake, honeycode, iam, identitystore, imagebuilder, importexport, inspector, inspector-scan, inspector2, internetmonitor, iot, iot-data, iot-jobs-data, iot-roborunner, iot1click-devices, iot1click-projects, iotanalytics, iotdeviceadvisor, iotevents, iotevents-data, iotfleethub, iotfleetwise, iotsecuretunneling, iotsitewise, iotthingsgraph, iottwinmaker, iotwireless, ivs, ivs-realtime, ivschat, kafka, kafkaconnect, kendra, kendra-ranking, keyspaces, kinesis, kinesis-video-archived-media, kinesis-video-media, kinesis-video-signaling, kinesis-video-webrtc-storage, kinesisanalytics, kinesisanalyticsv2, kinesisvideo, kms, lakeformation, lambda, launch-wizard, lex-models, lex-runtime, lexv2-models, lexv2-runtime, license-manager, license-manager-linux-subscriptions, license-manager-user-subscriptions, lightsail, location, logs, lookoutequipment, lookoutmetrics, lookoutvision, m2, machinelearning, macie2, managedblockchain, managedblockchain-query, marketplace-agreement, marketplace-catalog, marketplace-deployment, marketplace-entitlement, marketplacecommerceanalytics, mediaconnect, mediaconvert, medialive, mediapackage, mediapackage-vod, mediapackagev2, mediastore, mediastore-data, mediatailor, medical-imaging, memorydb, meteringmarketplace, mgh, mgn, migration-hub-refactor-spaces, migrationhub-config, migrationhuborchestrator, migrationhubstrategy, mobile, mq, mturk, mwaa, neptune, neptune-graph, neptunedata, network-firewall, networkmanager, networkmonitor, nimble, oam, omics, opensearch, opensearchserverless, opsworks, opsworkscm, organizations, osis, outposts, panorama, payment-cryptography, payment-cryptography-data, pca-connector-ad, personalize, personalize-events, personalize-runtime, pi, pinpoint, pinpoint-email, pinpoint-sms-voice, pinpoint-sms-voice-v2, pipes, polly, pricing, privatenetworks, proton, qbusiness, qconnect, qldb, qldb-session, quicksight, ram, rbin, rds, rds-data, redshift, redshift-data, redshift-serverless, rekognition, repostspace, resiliencehub, resource-explorer-2, resource-groups, resourcegroupstaggingapi, robomaker, rolesanywhere, route53, route53-recovery-cluster, route53-recovery-control-config, route53-recovery-readiness, route53domains, route53resolver, rum, s3, s3control, s3outposts, sagemaker, sagemaker-a2i-runtime, sagemaker-edge, sagemaker-featurestore-runtime, sagemaker-geospatial, sagemaker-metrics, sagemaker-runtime, savingsplans, scheduler, schemas, sdb, secretsmanager, securityhub, securitylake, serverlessrepo, service-quotas, servicecatalog, servicecatalog-appregistry, servicediscovery, ses, sesv2, shield, signer, simspaceweaver, sms, sms-voice, snow-device-management, snowball, sns, sqs, sqs-json, ssm, ssm-contacts, ssm-incidents, ssm-sap, sso, sso-admin, sso-oidc, stepfunctions, storagegateway, sts, supplychain, support, support-app, swf, synthetics, textract, timestream-query, timestream-write, tnb, transcribe, transfer, translate, trustedadvisor, verifiedpermissions, voice-id, vpc-lattice, waf, waf-regional, wafv2, wellarchitected, wisdom, workdocs, worklink, workmail, workmailmessageflow, workspaces, workspaces-thin-client, workspaces-web, xray)'.

A similar issue was reported here #9872 but I don't believe "When using aws-sdk:sfn:startExecution the returned error is incorrect. sfn is a valid service name when using aws-sdk on LocalStack Step Functions." was ever addressed in the solution. I am guessing there is some sort of internal transformation missing that would transform "sfn" to "stepfunctions" which is required by some internal library (boto3?)

Expected Behavior

The resource definition "arn:aws:states:::aws-sdk:sfn:sendTaskSuccess" is valid and should work within LocalStack without causing an unknown service error.
On the previous similar issue is says: sfn should appear in the list of valid service names for aws-sdk on Step Functions. I believe there may be some sort of internal transformation missing to get direct aws sfn internal sdk calls to work.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

  1. Define 2 simple state machines (one parent and one child), the parent state machine should have a waitForTaskToken task step that starts an execution of the child state machine. The child state machine should have sendTaskSuccess task step to call back the parent step function.
  2. Execute the parent state machine and see the UnknownServiceError come up for 'sfn' from the send task success step

Environment

- OS: macOS 14.4.1
- LocalStack: 3.2.0

Anything else?

No response

@athillairajah athillairajah added status: triage needed Requires evaluation by maintainers type: bug Bug report labels Apr 9, 2024
@localstack-bot
Copy link
Collaborator

Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Pro Support if you are a Pro user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines and our contributing guide.

@MEPalma MEPalma self-assigned this Apr 10, 2024
@MarcelStranak MarcelStranak added aws:stepfunctions AWS Step Functions status: backlog Triaged but not yet being worked on and removed status: triage needed Requires evaluation by maintainers labels Apr 10, 2024
@MEPalma
Copy link
Contributor

MEPalma commented Apr 10, 2024

@athillairajah Thank you for taking the time to compile this thorough report. I was able to replicate the behaviour in instances where the sendTaskSuccess call resulted in a failure. We recently merged some changes that aim to address this issue. These changes are scheduled to be included in the next nightly release too. I would be grateful if you could test the new build at your earliest convenience and provide feedback on whether it resolves the problem you encountered. Thank you once again for bringing this issue forward.

@MEPalma MEPalma added status: response required Waiting for a response from the reporter and removed status: backlog Triaged but not yet being worked on labels Apr 12, 2024
@localstack-bot
Copy link
Collaborator

Hello 👋! It looks like this issue hasn’t been active in longer than two weeks. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@localstack-bot localstack-bot added the status: stale To be closed soon due to staleness label Apr 24, 2024
@localstack-bot localstack-bot added status: resolved/stale Closed due to staleness and removed status: stale To be closed soon due to staleness labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:stepfunctions AWS Step Functions status: resolved/stale Closed due to staleness status: response required Waiting for a response from the reporter type: bug Bug report
Projects
None yet
Development

No branches or pull requests

4 participants