Created
December 28, 2019 11:44
-
-
Save hassaku63/4149ed888476a5cd3cd06eb3b2aa3a69 to your computer and use it in GitHub Desktop.
s3にputしたオブジェクトを言語検出→感情分析して結果をSNS通知するワークフローを実装するStepFunctionsのASL定義
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Comment": "A Hello World example of the Amazon States Language using Pass states", | |
"StartAt": "DetectLanguageJob", | |
"States": { | |
"DetectLanguageJob": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::lambda:invoke", | |
"Parameters": { | |
"FunctionName": "arn:aws:lambda:ap-northeast-1:012345678901:function:InvokeDetectLanguageFunctionName:$LATEST", | |
"Payload": { | |
"Input.$": "$" | |
} | |
}, | |
"Next": "DetectSentimentJob" | |
}, | |
"DetectSentimentJob": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::lambda:invoke", | |
"Parameters": { | |
"FunctionName": "arn:aws:lambda:ap-northeast-1:012345678901:function:InvokeDetectSentimentFunctionName:$LATEST", | |
"Payload": { | |
"Input.$": "$" | |
} | |
}, | |
"Next": "SnsNotification" | |
}, | |
"SnsNotification": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::sns:publish", | |
"Parameters": { | |
"Message": { | |
"Input.$": "$" | |
}, | |
"TopicArn": "arn:aws:sns:ap-northeast-1:012345678901:topicName" | |
}, | |
"End": true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment