Skip to content
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

docs: provide a sample iam policy #91

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: provide a sample iam policy
The AWS::Serverless::Function resource will give the proper IAM policies for the logger and tracing automatically but you need to provide an additional policy if you want to make use of the Metrics utility.
  • Loading branch information
Joris Conijn authored Jul 17, 2020
commit 65d340cfcdc1c229880bc94455f10d873fcf7846
12 changes: 12 additions & 0 deletions docs/content/core/metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ Resources:
Variables:
POWERTOOLS_SERVICE_NAME: payment # highlight-line
POWERTOOLS_METRICS_NAMESPACE: ServerlessAirline # highlight-line
...
Policies:
- Version: 2012-10-17
Statement:
# highlight-start
- Effect: Allow
Resource: '*'
Action: cloudwatch:PutMetricData
Condition:
ForAllValues:StringEquals:
cloudwatch:namespace: ServerlessAirline
# highlight-end
```

We recommend you use your application or main service as a metric namespace.
Expand Down