-
Notifications
You must be signed in to change notification settings - Fork 925
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
Adding apigw-sfn-crud-terraform pattern #2444
base: main
Are you sure you want to change the base?
Conversation
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 get an error when running `terraform apply´ due to CloudWatch Logs ARN not being specified. Please add instructions or link to documentation on how to do this.
│ Error: error updating API Gateway Stage (ags-6omth9g63d-Prod): BadRequestException: CloudWatch Logs role ARN must be set in account settings to enable logging
│
│ with aws_api_gateway_stage.API_SF_CRUD-tf_API_Stage_Prod,
│ on main.tf line 222, in resource "aws_api_gateway_stage" "API_SF_CRUD-tf_API_Stage_Prod":
│ 222: resource "aws_api_gateway_stage" "API_SF_CRUD-tf_API_Stage_Prod" {
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 3.27" |
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 use the most recent version
resource "aws_sfn_state_machine" "API_SF_CRUD-tf_CF" { | ||
name = "API_SF_CRUD-tf_CF" | ||
role_arn = aws_iam_role.API_SF_CRUD-tf_CFRole.arn | ||
definition = file("./crud.asl.json") |
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.
File is named crud-asl.json
|
||
## How it works | ||
|
||
Amazon API Gateway creates a direct integration with AWS Step Functions utilizing a synchronous call. Step functions evaluates the path and method to choose the proper action. The action steps can be modified to meet your needs. |
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 creates a direct integration with AWS Step Functions utilizing a synchronous call. Step functions evaluates the path and method to choose the proper action. The action steps can be modified to meet your needs. | |
Amazon API Gateway creates a direct integration with AWS Step Functions utilizing a synchronous call. The Step Functions state machine evaluates the path and method to choose the proper action. The action steps can be modified to meet your needs. |
|
||
*CRUD = Create, Read, Update, Delete* | ||
|
||
Once the application is deployed, use a tool like Postman or Curl to call the different CRUD endpoints. If you would like to import the Postman package, update the endpoint and import into Postman. |
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.
It isn't clear to me what is meant be updating the endpoint and importing it? Please also add an example of a curl
request
Issue #, if available:
#2443
Description of changes:
Adding terraform version of apigw-sfn-crud pattern
https://serverlessland.com/patterns/apigw-sfn-crud
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.