Skip to content

Commit 5c78dd6

Browse files
committed
Update
1 parent 479c012 commit 5c78dd6

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

Monitoring-Debugging/CloudWatch-Custom-Metrics/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Publishing Custom Metrics from Lambda
22

3-
Install the demo app using the [AWS Serverless Application Model](https://aws.amazon.com/serverless/sam/)
3+
Install the demo app using the [AWS Serverless Application Model](https://aws.amazon.com/serverless/sam/). You can find instructions to install the AWS SAM CLI [here](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html).
44

55
## Create the Lambda deployment package
66

Monitoring-Debugging/CloudWatch-Custom-Metrics/shopping-cart-app/template.yaml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ Resources:
2222
Path: /cart/add
2323
Method: get
2424
Policies:
25-
- Statement:
26-
- Sid: CloudWatchPutMetricDataPolicy
27-
Effect: Allow
28-
Action:
29-
- cloudwatch:PutMetricData
30-
Resource: '*'
25+
- CloudWatchPutMetricPolicy: {}
3126

3227
PurchaseFunction:
3328
Type: AWS::Serverless::Function
@@ -40,12 +35,7 @@ Resources:
4035
Path: /cart/purchase
4136
Method: get
4237
Policies:
43-
- Statement:
44-
- Sid: CloudWatchPutMetricDataPolicy
45-
Effect: Allow
46-
Action:
47-
- cloudwatch:PutMetricData
48-
Resource: '*'
38+
- CloudWatchPutMetricPolicy: {}
4939

5040
ViewProductFunction:
5141
Type: AWS::Serverless::Function
@@ -58,12 +48,7 @@ Resources:
5848
Path: /products/123456
5949
Method: get
6050
Policies:
61-
- Statement:
62-
- Sid: CloudWatchPutMetricDataPolicy
63-
Effect: Allow
64-
Action:
65-
- cloudwatch:PutMetricData
66-
Resource: '*'
51+
- CloudWatchPutMetricPolicy: {}
6752

6853
Outputs:
6954
AddToCartApi:

0 commit comments

Comments
 (0)