Skip to content

Commit 53c7695

Browse files
authored
Merge pull request #31 from dangmaul-amazon/main
Add log message to add AmazonCodeGuruProfilerAgentAccess policy to th…
2 parents 491e0e7 + d71e112 commit 53c7695

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

codeguru_profiler_agent/sdk_reporter/sdk_reporter.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def refresh_configuration(self):
8282
if self.should_auto_create_profiling_group():
8383
logger.info(
8484
"Profiling group not found. Will try to create a profiling group "
85-
"with name = {} and compute platform = {} and retry calling configure agent after 5 minutes"
85+
"with name = {} and compute platform = {} and retry calling configure agent after 5 minutes. "
86+
"Make sure that Lambda's execution role has AmazonCodeGuruProfilerAgentAccess policy added."
8687
.format(self.profiling_group_name, 'AWSLambda'))
8788
self.create_profiling_group()
8889
else:
@@ -118,7 +119,9 @@ def report(self, profile):
118119
self.__class__.is_create_pg_called_during_submit_profile = True
119120
logger.info(
120121
"Profiling group not found. Will try to create a profiling group "
121-
"with name = {} and compute platform = {}".format(self.profiling_group_name, 'AWSLambda'))
122+
"with name = {} and compute platform = {} and retry reporting during next invocation. "
123+
"Make sure that Lambda's execution role has AmazonCodeGuruProfilerAgentAccess policy added."
124+
.format(self.profiling_group_name, 'AWSLambda'))
122125
self.create_profiling_group()
123126
return False
124127
except Exception as e:

0 commit comments

Comments
 (0)