GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — aws-lambda-cpp-sam/cpp-lambda/tests/resources at main · rusterman/aws-lambda-cpp-sam

Expand file tree

/

resources

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

resources

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.dockerignore
.dockerignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
Dockerfile
Dockerfile
 
 
Readme.md
Readme.md
 
 
lambda_function.cpp
lambda_function.cpp
 
 
lambda_function.h
lambda_function.h
 
 
lambda_function_test.cpp
lambda_function_test.cpp
 
 
main.cpp
main.cpp
 
 
run_all_tests.sh
run_all_tests.sh
 
 

Readme.md

Outline

Lambda Test

This project demonstrates a simple AWS Lambda function setup using C++ and Google Test for unit testing. The project includes:

  • AWS Lambda function implementation.
  • Unit tests for the Lambda functions.
  • Dockerfile for building and running the project in an Amazon Linux environment.

Prerequisites

  • Docker
  • CMake (version 3.17 or higher)
  • AWS Lambda C++ Runtime
  • Google Test

Project Structure

  • CMakeLists.txt: CMake configuration file
  • Dockerfile: Dockerfile to build the environment and run tests
  • lambda_function.cpp: Implementation of Lambda functions
  • lambda_function.h: Header file for Lambda functions
  • lambda_function_test.cpp: Unit tests for Lambda functions
  • main.cpp: Main executable to invoke Lambda functions
  • run_all_tests.sh: Script to run all tests

Building and Running the Project

docker build -t lambda-test-fun .
docker run --rm -it lambda-test-fun

This command will execute the run_all_tests.sh script, which runs the Lambda functions and the unit tests.

Conclusion

This project demonstrates setting up AWS Lambda functions in C++, writing unit tests using Google Test, and using Docker to create a consistent build environment.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.