Skip to content

Commit b0b4be2

Browse files
added TOC to README
1 parent 44744cb commit b0b4be2

File tree

1 file changed

+40
-14
lines changed

1 file changed

+40
-14
lines changed

README.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@
44

55
This is the Serverless Framework plugin for AWS Step Functions.
66

7+
## TOC
8+
9+
- [Install](#install)
10+
- [Setup](#Setup)
11+
- [Adding a custom name for a state machine](#adding-a-custom-name-for-a-statemachine)
12+
- [Adding a custom logical id for a stateMachine](#adding-a-custom-logical-id-for-a-statemachine)
13+
- [Depending on another logical id](#depending-on-another-logical-id)
14+
- [CloudWatch Alarms](#cloudwatch-alarms)
15+
- [CloudWatch Notifications](#cloudwatch-notifications)
16+
- [Current Gotcha](#current-gotcha)
17+
- [Events](#events)
18+
- [API Gateway](#api-gateway)
19+
- [Simple HTTP endpoint](#simple-http-endpoint)
20+
- [HTTP Endpoint with custom IAM Role](#http-endpoint-with-custom-iam-role)
21+
- [Share API Gateway and API Resources](#share-api-gateway-and-api-resources)
22+
- [Enabling CORS](#enabling-cors)
23+
- [HTTP Endpoints with AWS_IAM Authorizers](#http-endpoints-with-aws_iam-authorizers)
24+
- [HTTP Endpoints with Custom Authorizers](#http-endpoints-with-custom-authorizers)
25+
- [Shared Authorizer](#shared-authorizer)
26+
- [LAMBDA_PROXY request template](#lambda_proxy-request-template)
27+
- [Customizing request body mapping templates](#customizing-request-body-mapping-templates)
28+
- [Send request to an API](#send-request-to-an-api)
29+
- [Setting API keys for your Rest API](#setting-api-keys-for-your-rest-api)
30+
- [Schedule](#schedule)
31+
- [Enabling / Disabling](#enabling--disabling)
32+
733
## Install
834

935
Run `npm install` in your Serverless project.
@@ -140,7 +166,7 @@ plugins:
140166

141167
You can then `Ref: SendMessageStateMachine` in various parts of CloudFormation or serverless.yml
142168

143-
#### Depending on another logical id
169+
### Depending on another logical id
144170

145171
If your state machine depends on another resource defined in your `serverless.yml` then you can add a `dependsOn` field to the state machine `definition`. This would add the `DependsOn`clause to the generated CloudFormation template.
146172

@@ -158,7 +184,7 @@ stepFunctions:
158184
- myStream
159185
```
160186

161-
#### CloudWatch Alarms
187+
### CloudWatch Alarms
162188

163189
It's common practice to want to monitor the health of your state machines and be alerted when something goes wrong. You can either:
164190

@@ -226,7 +252,7 @@ alarms:
226252
treatMissingData: ignore # default
227253
```
228254

229-
#### CloudWatch Notifications
255+
### CloudWatch Notifications
230256

231257
You can monitor the execution state of your state machines [via CloudWatch Events](https://aws.amazon.com/about-aws/whats-new/2019/05/aws-step-functions-adds-support-for-workflow-execution-events/). It allows you to be alerted when the status of your state machine changes to `ABORTED`, `FAILED`, `RUNNING`, `SUCCEEDED` or `TIMED_OUT`.
232258

@@ -266,7 +292,7 @@ CloudFormation intrinsic functions such as `Ref` and `Fn::GetAtt` are supported.
266292

267293
When setting up a notification target against a FIFO SQS queue, the queue must enable the content-based deduplication option and you must configure the `messageGroupId`.
268294

269-
#### Current Gotcha
295+
## Current Gotcha
270296

271297
Please keep this gotcha in mind if you want to reference the `name` from the `resources` section. To generate Logical ID for CloudFormation, the plugin transforms the specified name in serverless.yml based on the following scheme.
272298

@@ -493,7 +519,7 @@ stepFunctions:
493519
definition:
494520
```
495521

496-
### Share Authorizer
522+
#### Shared Authorizer
497523

498524
Auto-created Authorizer is convenient for conventional setup. However, when you need to define your custom Authorizer, or use COGNITO_USER_POOLS authorizer with shared API Gateway, it is painful because of AWS limitation. Sharing Authorizer is a better way to do.
499525

@@ -636,7 +662,7 @@ stepFunctions:
636662
definition:
637663
```
638664

639-
## Enabling / Disabling
665+
#### Enabling / Disabling
640666

641667
**Note:** `schedule` events are enabled by default.
642668

@@ -662,7 +688,7 @@ stepFunctions:
662688
inputPath: '$.stageVariables'
663689
```
664690

665-
## Specify Name and Description
691+
#### Specify Name and Description
666692

667693
Name and Description can be specified for a schedule event. These are not required properties.
668694

@@ -674,7 +700,7 @@ events:
674700
rate: rate(2 hours)
675701
```
676702

677-
## Scheduled Events IAM Role
703+
#### Scheduled Events IAM Role
678704

679705
By default, the plugin will create a new IAM role that allows AWS Events to start your state machine. Note that this role is different than the role assumed by the state machine. You can specify your own role instead (it must allow `events.amazonaws.com` to assume it, and it must be able to run `states:StartExecution` on your state machine):
680706

@@ -687,7 +713,7 @@ events:
687713

688714
### CloudWatch Event
689715

690-
## Simple event definition
716+
#### Simple event definition
691717

692718
This will enable your Statemachine to be called by an EC2 event rule.
693719
Please check the page of [Event Types for CloudWatch Events](http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html).
@@ -710,7 +736,7 @@ stepFunctions:
710736
...
711737
```
712738

713-
## Enabling / Disabling
739+
#### Enabling / Disabling
714740

715741
**Note:** `cloudwatchEvent` events are enabled by default.
716742

@@ -735,7 +761,7 @@ stepFunctions:
735761
...
736762
```
737763

738-
## Specify Input or Inputpath
764+
#### Specify Input or Inputpath
739765

740766
You can specify input values ​​to the Lambda function.
741767

@@ -772,7 +798,7 @@ stepFunctions:
772798
...
773799
```
774800

775-
## Specifying a Description
801+
#### Specifying a Description
776802

777803
You can also specify a CloudWatch Event description.
778804

@@ -795,7 +821,7 @@ stepFunctions:
795821
...
796822
```
797823

798-
## Specifying a Name
824+
#### Specifying a Name
799825

800826
You can also specify a CloudWatch Event name. Keep in mind that the name must begin with a letter; contain only ASCII letters, digits, and hyphens; and not end with a hyphen or contain two consecutive hyphens. More infomation [here](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).
801827

@@ -818,7 +844,7 @@ stepFunctions:
818844
...
819845
```
820846

821-
## Tags
847+
### Tags
822848

823849
You can specify tags on each state machine. Additionally any global tags (specified under `provider` section in your `serverless.yml`) would be merged in as well.
824850

0 commit comments

Comments
 (0)