Skip to content

Conversation

awsrahulrsr
Copy link
Contributor

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.

@awsrahulrsr
Copy link
Contributor Author

Hi Team,
Checking if this pull request can be merged?

"logs:DescribeResourcePolicies",
"logs:DescribeLogGroups"
],
Resource = "*"
Copy link
Contributor

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 ("*")?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per this documentation we need to use "*". I tried to restrict it but terraform --apply fails with access denied to log group error.

"comprehend:BatchDetectDominantLanguage",
"comprehend:BatchDetectSentiment"
],
Resource = "*"
Copy link
Contributor

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 ("*")?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the calls like Detect sentiment, Detect Entities cannot be resource level ARN's.. hence I've used "*"

@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazon API Gateway

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


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.
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

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
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -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.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resouces --> resources

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -0,0 +1,92 @@
# AWS Step Functions Express Workflow to Amazon Comprehend for Sentiment Analysis
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -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.",
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -0,0 +1,65 @@
{
"title": "AWS Step Functions Express Workflow to Amazon Comprehend for Sentiment Analysis",
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"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"
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@biswanathmukherjee
Copy link
Contributor

Approving from pattern guardian perspective. DA will review and merge as per the next steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants