AWS CDK v1 has reached End-of-Support on 2023-06-01.
This package is no longer being updated, and users should migrate to AWS CDK v2.
For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html
import * as codeguruprofiler from '@aws-cdk/aws-codeguruprofiler';
基本用途
以下是如何设置剖析组,并给予您计算的角色权限,向剖析组发布剖析代理可以发布剖析信息:
// 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 iam.Role(this, 'PublishAppRole', {
assumedBy: new iam.AccountRootPrincipal(),
});
const profilingGroup = new codeguruprofiler.ProfilingGroup(this, 'MyProfilingGroup');
profilingGroup.grantPublish(publishAppRole);
计算平台配置
Code Guru 配置器支持多个计算环境.
通过使用 computePlatform 属性 :
const profilingGroup = new codeguruprofiler.ProfilingGroup(this, 'MyProfilingGroup', {
computePlatform: codeguruprofiler.ComputePlatform.AWS_LAMBDA,
});
AWS 的 CDK 构建库: codeGuru Profiller注意:该包已被作者标记为弃用——AWS CDK v1 has reached End-of-Support on 2023-06-01.
This package is no longer being updated, and users should migrate to AWS CDK v2.
For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html