AWS::CodeGuruProfiler::ProfilingGroup - AWS CloudFormation

AWS::CodeGuruProfiler::ProfilingGroup

Creates a profiling group.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::CodeGuruProfiler::ProfilingGroup", "Properties" : { "AgentPermissions" : AgentPermissions, "AnomalyDetectionNotificationConfiguration" : [ Channel, ... ], "ComputePlatform" : String, "ProfilingGroupName" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::CodeGuruProfiler::ProfilingGroup Properties: AgentPermissions: AgentPermissions AnomalyDetectionNotificationConfiguration: - Channel ComputePlatform: String ProfilingGroupName: String Tags: - Tag

Properties

AgentPermissions

The agent permissions attached to this profiling group. This action group grants ConfigureAgent and PostAgentProfile permissions to perform actions required by the profiling agent. The Json consists of key Principals.

Principals: A list of string ARNs for the roles and users you want to grant access to the profiling group. Wildcards are not supported in the ARNs. You are allowed to provide up to 50 ARNs. An empty list is not permitted. This is a required key.

For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler user guide, ConfigureAgent, and PostAgentProfile.

Required: No

Type: AgentPermissions

Update requires: No interruption

AnomalyDetectionNotificationConfiguration

Adds anomaly notifications for a profiling group.

Required: No

Type: Array of Channel

Update requires: No interruption

ComputePlatform

The compute platform of the profiling group. Use AWSLambda if your application runs on AWS Lambda. Use Default if your application runs on a compute platform that is not AWS Lambda, such an Amazon EC2 instance, an on-premises server, or a different platform. If not specified, Default is used. This property is immutable.

Required: No

Type: String

Allowed values: Default | AWSLambda

Update requires: Replacement

ProfilingGroupName

The name of the profiling group.

Required: Yes

Type: String

Pattern: ^[\w-]+$

Minimum: 1

Maximum: 255

Update requires: Replacement

Tags

A list of tags to add to the created profiling group.

Required: No

Type: Array of Tag

Maximum: 50

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the name of the profiling group.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The full Amazon Resource Name (ARN) for that profiling group.

Examples

CodeGuru Profiler profiling group resource configuration

The following is an example of the profiling group resource with the profiling group name and agent permissions properties.

JSON

"MyProfilingGroupWithAgentPermissions": { "Type": "AWS::CodeGuruProfiler::ProfilingGroup", "Properties": { "ProfilingGroupName": "MyProfilingGroup", "AgentPermissions": { "Principals": [ "arn:aws:iam::1233456789012:role/agent-permissions-role-1", "arn:aws:iam::1233456789012:role/agent-permissions-role-2" ] } } }

YAML

MyProfilingGroupWithAgentPermissions: Type: AWS::CodeGuruProfiler::ProfilingGroup Properties: ProfilingGroupName: "MyProfilingGroup" AgentPermissions: Principals: - "arn:aws:iam::1233456789012:role/agent-permissions-role-1" - "arn:aws:iam::1233456789012:role/agent-permissions-role-2"

CodeGuru Profiler profiling group resource with compute platform

The following is an example of the profiling group resource that runs on AWS Lambda.

JSON

"MyProfilingGroupWithComputePlatform": { "Type": "AWS::CodeGuruProfiler::ProfilingGroup", "Properties": { "ProfilingGroupName": "MyProfilingGroup", "ComputePlatform": "AWSLambda" } }

YAML

MyProfilingGroupWithComputePlatform: Type: AWS::CodeGuruProfiler::ProfilingGroup Properties: ProfilingGroupName: "MyProfilingGroup" ComputePlatform: "AWSLambda"

CodeGuru Profiler profiling group resource with notifications

The following is an example of the a notification configuration for a profiling group.

JSON

"MyProfilingGroupWithNotificationChannelConfiguration": { "Type": "AWS::CodeGuruProfiler::ProfilingGroup", "Properties": { "ProfilingGroupName": "MyProfilingGroup", "AnomalyDetectionNotificationConfiguration": [ { "channelUri": "SOME_SNS_TOPIC_ARN", "channelId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" } ] } }

YAML

MyProfilingGroupWithNotificationChannelConfiguration: Type: AWS::CodeGuruProfiler::ProfilingGroup Properties: ProfilingGroupName: MyProfilingGroup AnomalyDetectionNotificationConfiguration: - channelUri: SOME_SNS_TOPIC_ARN channelId: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee

CodeGuru Profiler profiling group configuration

The following is an example of a profiling group that runs on AWS Lambda. This profiling group has enabled agent permissions. Notifications have also been configured with AnomalyDetectionConfiguration.

JSON

"MyProfilingGroupWithAgentPermissions": { "Type": "AWS::CodeGuruProfiler::ProfilingGroup", "Properties": { "ProfilingGroupName": "MyProfilingGroup", "ComputePlatform": "AWSLambda", "AgentPermissions": { "Principals": [ "arn:aws:iam::1233456789012:role/agent-permissions-role-1", "arn:aws:iam::1233456789012:role/agent-permissions-role-2" ] }, "AnomalyDetectionNotificationConfiguration": [ { "channelUri": "SOME_SNS_TOPIC_ARN", "channelId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" } ] } }

YAML

MyProfilingGroup: Type: AWS::CodeGuruProfiler::ProfilingGroup Properties: ProfilingGroupName: "MyProfilingGroup" ComputePlatform: "AWSLambda" AgentPermissions: Principals: - "arn:aws:iam::1233456789012:role/agent-permissions-role-1" - "arn:aws:iam::1233456789012:role/agent-permissions-role-2" AnomalyDetectionNotificationConfiguration: - channelUri: SOME_SNS_TOPIC_ARN channelId: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee