MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / main

Function main

examples/dynamodb/main.cpp:207–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207int main()
208{
209 using namespace Aws;
210 SDKOptions options;
211 options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
212 options.loggingOptions.logger_create_fn = GetConsoleLoggerFactory();
213 InitAPI(options);
214 {
215 Aws::Client::ClientConfiguration config;
216 config.region = Aws::Environment::GetEnv("AWS_REGION");
217 config.caFile = "/etc/pki/tls/certs/ca-bundle.crt";
218 config.disableExpectHeader = true;
219
220 auto credentialsProvider = Aws::MakeShared<Aws::Auth::EnvironmentAWSCredentialsProvider>(TAG);
221 Aws::DynamoDB::DynamoDBClient client(credentialsProvider, config);
222 auto handler_fn = [&client](aws::lambda_runtime::invocation_request const& req) {
223 return my_handler(req, client);
224 };
225 aws::lambda_runtime::run_handler(handler_fn);
226 }
227 ShutdownAPI(options);
228 return 0;
229}

Callers

nothing calls this directly

Calls 4

GetEnvFunction · 0.85
run_handlerFunction · 0.85
GetConsoleLoggerFactoryFunction · 0.70
my_handlerFunction · 0.70

Tested by

no test coverage detected