Set up in the Lambda console - Amazon CodeGuru Profiler

Set up in the Lambda console

You can use the following method if you'd like to create a profiling group with your Lambda function. This method automatically creates a profiling group when a profile is available to submit. This method is applicable for runtimes Python 3.8, Python 3.9, Java 8 (Corretto) and Java 11 (Corretto). Alternatively, you can create a profiling group by following the instructions in Setting up in the CodeGuru Profiler console.

Step 1: Sign up for AWS

When you sign up for Amazon Web Services (AWS), your AWS account is automatically signed up for all services in AWS, including CodeGuru Profiler. You're charged only for the services that you use.

If you have an AWS account already, move on to the next task. If you don't have an AWS account, use the following procedure to create one.

To create an AWS account

  1. Open https://portal.aws.amazon.com/billing/signup.

  2. Follow the online instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.

Step 2: Enable CodeGuru Profiler

A profiling group can profile one or more applications. Data is aggregated and displayed based on the whole profiling group.

For example, if you have a collection of microservices that handle restaurant recommendations, you can collect profile data and identify performance issues across all these microservices in a single profiling group named "Restaurant-Recommendations".

To enable profiling from the Lambda console

  1. Sign in to the AWS Management Console, and then open the Lambda console.

  2. Choose your Lambda function. In the Configuration tab, choose Monitoring and operation tools. Choose Edit.

  3. Enable code profiling in the Amazon CodeGuru Profiler section. This creates a profiling group when a profile is available to submit.

Note

If you want to delete your profiling group, visit the CodeGuru Profiler console. If you disable code profiling in the Lambda console, your profiling group still exists.

If the execution role of your Lambda function doesn’t have the required CodeGuru Profiler permissions such as AmazonCodeGuruProfilerAgentAccess or your function doesn’t have the required environment variables, the Lambda console attempts to add them.