Why can't my service get the existent AWS CodeGuru profiling group?

0

Hi, I deploy a service on AWS ECS. But it keeps reporting errors

01 Jan 2024 16:29:10,598 [INFO] software.amazon.codeguruprofilerjavaagent.CodeGuruProfilerSDKClient: Profiling group not found. Will retry after 5 minutes. 

Why?

I use Enabling the agent with code to enable the agent. And my code is as follows:

private static Profiler startProfiler() {
        try {
            Profiler profiler = Profiler
                .builder()
                .profilingGroupName("JICSAppBackendServiceProfilingGroup")
                .awsCredentialsProvider(DefaultCredentialsProvider.create())
                .withHeapSummary(true)
                .awsRegionToReportTo(Region.US_WEST_2)
                .build();
            profiler.start();
            log.info("CodeGuru profiler started!");
            return profiler;
        } catch (Exception e) {
            log.error("Exception while starting CodeGuru profiler: ", e);
            return null;
        }
    }

Besides, I already create a profiling group named JICSAppBackendServiceProfilingGroup in US_WEST_2, and I already add permission AmazonCodeGuruProfilerAgentAccess to all the ECS related role.

Enter image description here

Enter image description here

질문됨 5달 전134회 조회
1개 답변
0
수락된 답변

I've made a stupid mistake. There is no problem with the above work.

답변함 5달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인