-
Notifications
You must be signed in to change notification settings - Fork 1k
Terraform template for AWS Step Functions workflow to integrate with Amazon Comprehend for sentiment analysis #2805
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
base: main
Are you sure you want to change the base?
Conversation
Hi Team, |
"logs:DescribeResourcePolicies", | ||
"logs:DescribeLogGroups" | ||
], | ||
Resource = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be more restrictive than providing access to all resources ("*")?
"comprehend:BatchDetectDominantLanguage", | ||
"comprehend:BatchDetectSentiment" | ||
], | ||
Resource = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be more restrictive than providing access to all resources ("*")?
@@ -0,0 +1,92 @@ | |||
# AWS Step Functions Express Workflow to Amazon Comprehend for Sentiment Analysis | |||
|
|||
The Step Functions Express Workflow can be started using the AWS CLI or from another service (e.g. API Gateway) to run an express workflow and return the result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazon API Gateway
|
||
The Step Functions Express Workflow can be started using the AWS CLI or from another service (e.g. API Gateway) to run an express workflow and return the result. | ||
|
||
The Terraform template deploys a Step Functions Express workflow that invokes Amazon Comprehend and returns the sentiment analysis done by Comprehend in the response. The Terraform template contains the required resouces with IAM permission to run the application with logging enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace Comprehend with Amazon Comprehend everywhere. The prefix is required everywhere.
3. From the command line, use Terraform to deploy the AWS resources for the pattern as specified in the main.tf file: | ||
``` | ||
terraform init | ||
terraform apply --auto-approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this error when running apply command.
│ Error: Reference to undeclared input variable
│
│ on main.tf line 14, in resource "aws_iam_role" "states_execution_role":
│ 14: Service = "states.${var.aws_region}.amazonaws.com"
│
│ An input variable with the name "aws_region" has not been declared. This variable can be declared with a variable
│ "aws_region" {} block.
@@ -0,0 +1,65 @@ | |||
{ | |||
"title": "AWS Step Functions Express Workflow to Amazon Comprehend for Sentiment Analysis", | |||
"description": "The Terraform template deploys a Step Functions Express workflow that invokes Amazon Comprehend and returns the sentiment analysis done by Comprehend in the response. The SAM template contains the required resouces with IAM permission to run the application with logging enabled.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resouces --> resources
@@ -0,0 +1,92 @@ | |||
# AWS Step Functions Express Workflow to Amazon Comprehend for Sentiment Analysis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title does not meet maximum length of 75
@@ -0,0 +1,65 @@ | |||
{ | |||
"title": "AWS Step Functions Express Workflow to Amazon Comprehend for Sentiment Analysis", | |||
"description": "The Terraform template deploys a Step Functions Express workflow that invokes Amazon Comprehend and returns the sentiment analysis done by Comprehend in the response. The SAM template contains the required resouces with IAM permission to run the application with logging enabled.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description does not meet maximum length of 150
@@ -0,0 +1,65 @@ | |||
{ | |||
"title": "AWS Step Functions Express Workflow to Amazon Comprehend for Sentiment Analysis", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title does not meet maximum length of 75
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/sfn-comprehend-terraform", | ||
"templateURL": "serverless-patterns/sfn-comprehend-terraform", | ||
"projectFolder": "sfn-comprehend-terraform", | ||
"templateFile": "sfn-comprehend-terraform/main.tf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the projectFolder value from the templateFile
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.