Commit 095ff84 1 parent c3d92f7 commit 095ff84 Copy full SHA for 095ff84
File tree 4 files changed +28
-2
lines changed
4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+ phases :
3
+ pre_build :
4
+ commands :
5
+ - yum install -y zip
6
+ build :
7
+ commands :
8
+ - cmake3 -S . -B build -DENABLE_TESTS=ON -DTEST_RESOURCE_PREFIX=al2arm -GNinja
9
+ - cd build
10
+ - ninja-build
11
+ - ninja-build aws-lambda-package-lambda-test-fun
12
+ - ctest3 --output-on-failure
Original file line number Diff line number Diff line change
1
+ FROM public.ecr.aws/amazonlinux/amazonlinux:2
2
+ RUN yum install -y cmake3 ninja-build git gcc-c++ openssl-devel curl-devel
3
+ RUN git clone https://github.com/aws/aws-sdk-cpp --recurse-submodules
4
+ RUN cmake3 -Saws-sdk-cpp -Baws-sdk-cpp/build -DBUILD_ONLY=lambda -DENABLE_TESTING=OFF -GNinja
5
+ RUN cd aws-sdk-cpp/build && ninja-build && ninja-build install
6
+ RUN yum install -y openssl-static
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ sh cmake-install --skip-license --prefix=/usr --exclude-subdirectory;
9
9
10
10
RUN pip3 install --upgrade pip
11
11
12
- RUN git clone https://github.com/aws/aws-sdk-cpp.git
12
+ RUN git clone https://github.com/aws/aws-sdk-cpp.git --recurse-submodules
13
13
14
14
RUN update-alternatives --set cc /usr/bin/clang
15
15
RUN update-alternatives --set c++ /usr/bin/clang++
Original file line number Diff line number Diff line change
1
+ #include < aws/lambda/model/Architecture.h>
1
2
#include < aws/core/client/ClientConfiguration.h>
2
3
#include < aws/core/utils/Array.h>
3
4
#include < aws/core/utils/Outcome.h>
16
17
#include < cstdio>
17
18
#include < sys/stat.h>
18
19
#include < unistd.h>
20
+ #include < vector>
19
21
20
22
extern std::string aws_prefix;
21
23
@@ -93,7 +95,13 @@ struct LambdaRuntimeTest : public ::testing::Test {
93
95
Model::FunctionCode funcode;
94
96
funcode.SetZipFile (std::move (zip_file_bytes));
95
97
create_function_request.SetCode (std::move (funcode));
96
- create_function_request.SetRuntime (Aws::Lambda::Model::Runtime::provided);
98
+ create_function_request.SetRuntime (Aws::Lambda::Model::Runtime::provided_al2);
99
+
100
+ std::vector<Aws::Lambda::Model::Architecture> lambda_architectures = {Aws::Lambda::Model::Architecture::x86_64};
101
+ #ifdef __aarch64__
102
+ lambda_architectures[0 ] = Aws::Lambda::Model::Architecture::arm64;
103
+ #endif
104
+ create_function_request.SetArchitectures (lambda_architectures);
97
105
98
106
auto outcome = m_lambda_client.CreateFunction (create_function_request);
99
107
ASSERT_TRUE (outcome.IsSuccess ()) << " Failed to create function " << function_name;
You can’t perform that action at this time.
0 commit comments