Skip to content

Commit 4a1093e

Browse files
committed
Compile against GLIBC v2.27 - this fixes the issue
1 parent 543d3f4 commit 4a1093e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ set -o pipefail
66

77
export AWS_ACCESS_KEY_ID=test
88
export AWS_SECRET_ACCESS_KEY=test
9-
export AWS_DEFAULT_REGION=us-east-1
109

1110
BIN="hello-world-fn"
11+
TARGET="aarch64-unknown-linux-gnu"
1212

1313
LAMBDA_DIR=target/lambda
14-
RELEASE_DIR=target/release
14+
RELEASE_DIR=target/$TARGET/release
1515
FN_DIR=$LAMBDA_DIR/$BIN
1616

1717
mkdir -p $LAMBDA_DIR
18-
cross build --bin $BIN --release --target aarch64-unknown-linux-musl
18+
cargo zigbuild --bin $BIN --release --target $TARGET.2.27
1919
rm -rf $FN_DIR 2>/dev/null || true
2020
mkdir -p $FN_DIR
2121
cp $RELEASE_DIR/$BIN $FN_DIR/bootstrap

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ resource "aws_lambda_function" "hello_world" {
2222
filename = local.fn_archive
2323
source_code_hash = filebase64sha256(local.fn_archive)
2424
runtime = "provided.al2"
25+
architectures = ["arm64"]
2526

2627
environment {
2728
variables = {

0 commit comments

Comments
 (0)