Skip to content

fatal error: 'aws/bedrock-runtime/model/InternalServerException.h' file not found #3389

@Chen188

Description

@Chen188

Describe the bug

Failed to compile BedrockRuntime ConverseStream sample code. Looks like the CPP SDK lakes of InternalServerException.h file, which is included in aws/bedrock-runtime/model/ConverseStreamOutput.h.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Fix the error: 'aws/bedrock-runtime/model/InternalServerException.h' file not found

Current Behavior

% cmake .
-- Found AWS SDK for C++, Version: 1.11.552, Install Root:/usr/local, Platform Prefix:, Platform Dependent Libraries: pthread;curl
-- Components specified for AWSSDK: bedrock-runtime;core, application will be depending on libs: aws-cpp-sdk-bedrock-runtime;aws-cpp-sdk-core
-- Try finding aws-cpp-sdk-core
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found aws-cpp-sdk-core
-- Try finding aws-cpp-sdk-bedrock-runtime
-- Found aws-cpp-sdk-bedrock-runtime
-- Configuring done (0.9s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/xx/test-cpp-sdk-bedrock/build
% make

[ 50%] Building CXX object CMakeFiles/converse_stream_sample.dir/converse_stream_sample.cpp.o
In file included from /Users/xx/test-cpp-sdk-bedrock/converse_stream_sample.cpp:4:
/usr/local/include/aws/bedrock-runtime/model/ConverseStreamOutput.h:14:10: fatal error: 'aws/bedrock-runtime/model/InternalServerException.h' file not found
   14 | #include <aws/bedrock-runtime/model/InternalServerException.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/converse_stream_sample.dir/converse_stream_sample.cpp.o] Error 1
make[1]: *** [CMakeFiles/converse_stream_sample.dir/all] Error 2
make: *** [all] Error 2

Reproduction Steps

  • build and install the latest aws cpp sdk
  • sample code:
    #include <iostream>
    #include <aws/core/Aws.h>
    #include <aws/bedrock-runtime/BedrockRuntimeClient.h>
    #include <aws/bedrock-runtime/model/ConverseStreamRequest.h>
    #include <aws/bedrock-runtime/model/ConverseStreamOutput.h>
    
    using namespace Aws::BedrockRuntime;
    using namespace Aws::BedrockRuntime::Model;
    
    int main() {
        std::cout << "hello world" << std::endl;
    }

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### AWS CPP SDK version used

1.11.552

### Compiler and Version used

Apple clang version 17.0.0 (clang-1700.0.13.3) / VS Version: 1.99.3 (Universal)

### Operating System and version

macOS 15.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions