Skip to content

Commit

Permalink
feat(codeguruprofiler): setup L2 construct to create profiler group a…
Browse files Browse the repository at this point in the history
…nd setup functions to add publish/read policies to IGrantable
  • Loading branch information
SeekerWing committed May 19, 2020
1 parent af0b940 commit ddaa37b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-codeguruprofiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import * as codeguruprofiler from '@aws-cdk/aws-codeguruprofiler';
Here's how to setup a profiling group and give your compute role permissions to publish to the profiling group to the profiling agent can publish profiling information:

```ts
const profilingGroup = new ProfilingGroup(stack, 'MyProfilingGroup', {
profilingGroupName: 'MyAwesomeProfilingGroup',
});

// The execution role of your application that publishes to the ProfilingGroup via CodeGuru Profiler Profiling Agent. (the following is merely an example)
const publishAppRole = new Role(stack, 'PublishAppRole', {
assumedBy: new AccountRootPrincipal(),
});

const profilingGroup = new ProfilingGroup(stack, 'MyProfilingGroup', {
profilingGroupName: 'MyAwesomeProfilingGroup',
});
profilingGroup.grantPublish(publishAppRole);
```

0 comments on commit ddaa37b

Please sign in to comment.