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

Function main

examples/s3/main.cpp:64–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64int main()
65{
66 using namespace Aws;
67 SDKOptions options;
68 options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
69 options.loggingOptions.logger_create_fn = GetConsoleLoggerFactory();
70 InitAPI(options);
71 {
72 Client::ClientConfiguration config;
73 config.region = Aws::Environment::GetEnv("AWS_REGION");
74 config.caFile = "/etc/pki/tls/certs/ca-bundle.crt";
75
76 S3::S3Client client(config);
77 auto handler_fn = [&client](aws::lambda_runtime::invocation_request const& req) {
78 return my_handler(req, client);
79 };
80 run_handler(handler_fn);
81 }
82 ShutdownAPI(options);
83 return 0;
84}
85
86std::string encode(Aws::IOStream& stream, Aws::String& output)
87{

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