issue to create volume from snapshot using in-build step function

0

using step functions "create volume" (arn:aws:states:::aws-sdk:ec2:createVolume.waitForTaskToken) I want to create a volume from encrypted snapshot, but step fucntion It never get resume or not throwing any error. It keep running for ever! I have already passed availability zone, kmskeyId, encrypt=true, snapshot id, size, type , but it keeps running for ever. I have also allowed full access of EC2 and also allowed full access of KMS to step function. but still it is not working.

질문됨 일 년 전271회 조회
2개 답변
0

One way to troubleshoot would be to build a test user in IAM with admin rights (Delete this user when done with the test)

Try your step function with these enhanced rights. If it now works . . .

Use IAM Acccess analyser to build a policy that has all the needed access. https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_generate-policy.html

profile pictureAWS
답변함 일 년 전
0

I'm sorry to hear that this was confusing, but the feature is working as expected. Please see the help link below. The .waitForTaskToken integration pattern allows you to pass a token to a the target of a Task that you then need to call back to Step Functions with (using the SendTaskSuccess, SendTaskFailure, etc API Actions). In the meantime, the workflow execution will wait. https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token

I believe what you expected was the behavior of the .sync / Run A Job integration pattern. Unfortunately, this is only available for a select set of API actions via Optimized Service Integrations. https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync https://docs.aws.amazon.com/step-functions/latest/dg/connect-supported-services.html

Given we do not have such an optimized integration for ec2:createVolume, I suggest you consider using a job-poller-pattern to check for status and continue the workflow. https://docs.aws.amazon.com/step-functions/latest/dg/sample-project-job-poller.html

A handy approach is to encapsulate this in a separate state machine that can be called using the .sync service integration for Step Functions so you can reuse it in different workflows. You can see that approach in action in this blog post: https://aws.amazon.com/blogs/compute/orchestrating-aws-glue-crawlers-using-aws-step-functions/

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠