Skip to content

Commit

Permalink
Merge branch 'master' into lambda-nodejs-index-fail
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed Aug 17, 2020
2 parents e78fe67 + 4ef80cf commit 8720697
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ All notable changes to this project will be documented in this file. See [standa

* **cloudwatch:** alarm status widget ([#9456](https://github.com/aws/aws-cdk/issues/9456)) ([41940d3](https://github.com/aws/aws-cdk/commit/41940d3cfad289cbaed8ff60a21c6c9fa9aad532))
* **cognito:** better control sms role creation ([#9513](https://github.com/aws/aws-cdk/issues/9513)) ([a772fe8](https://github.com/aws/aws-cdk/commit/a772fe84784e62843ef724a9158fc8cda848c5c9)), closes [#6943](https://github.com/aws/aws-cdk/issues/6943)
* **core:** deprecate "Construct.node" in favor of "Construct.construct" ([#9557](https://github.com/aws/aws-cdk/issues/9557)) ([aa4c5b7](https://github.com/aws/aws-cdk/commit/aa4c5b7df3a4880638361026ec0f6a77b7476b40)), closes [/github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#10](https://github.com/aws//github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md/issues/10)
* **core:** local bundling provider ([#9564](https://github.com/aws/aws-cdk/issues/9564)) ([3da0aa9](https://github.com/aws/aws-cdk/commit/3da0aa99d16e908a39f43f463ac2889dd232c611))
* **core:** new annotations api ([#9563](https://github.com/aws/aws-cdk/issues/9563)) ([ae9ed62](https://github.com/aws/aws-cdk/commit/ae9ed6208dc81a7a38f4b9626c7c30f1811f97a9)), closes [/github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#09](https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#09-logging-logging-api-changes)
* **core:** new APIs for Aspects and Tags ([#9558](https://github.com/aws/aws-cdk/issues/9558)) ([a311428](https://github.com/aws/aws-cdk/commit/a311428d6013a1486585979a010f4105b0e0f97a)), closes [/github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#02](https://github.com/aws/aws-cdk-rfcs/blob/master/text/0192-remove-constructs-compat.md#02-aspects-changes-in-aspects-api)
Expand Down
6 changes: 4 additions & 2 deletions packages/@aws-cdk/aws-lambda/lib/function.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
import { IProfilingGroup, ProfilingGroup } from '@aws-cdk/aws-codeguruprofiler';
import { IProfilingGroup, ProfilingGroup, ComputePlatform } from '@aws-cdk/aws-codeguruprofiler';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as iam from '@aws-cdk/aws-iam';
import * as logs from '@aws-cdk/aws-logs';
Expand Down Expand Up @@ -572,7 +572,9 @@ export class Function extends FunctionBase {
};
} else if (props.profiling) {
this.validateProfilingEnvironmentVariables(props);
const profilingGroup = new ProfilingGroup(this, 'ProfilingGroup');
const profilingGroup = new ProfilingGroup(this, 'ProfilingGroup', {
computePlatform: ComputePlatform.AWS_LAMBDA,
});
profilingGroup.grantPublish(this.role);
profilingGroupEnvironmentVariables = {
AWS_CODEGURU_PROFILER_GROUP_ARN: profilingGroup.profilingGroupArn,
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-lambda/test/test.function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export = testCase({

expect(stack).to(haveResource('AWS::CodeGuruProfiler::ProfilingGroup', {
ProfilingGroupName: 'MyLambdaProfilingGroupC5B6CCD8',
ComputePlatform: 'AWSLambda',
}));

expect(stack).to(haveResource('AWS::IAM::Policy', {
Expand Down

0 comments on commit 8720697

Please sign in to comment.