Linux:
sam build
macOS:
AWS Lambda requires native applications to be built in an Amazon Linux compatible OS, so on macOS we need to run the build in a compatible Docker container.
-
Build the Docker image compatible with AWS Linux:
./aws-image/build-aws-image.sh
-
Run
sam build
specifying the Docker image:sam build --use-container --build-image tech.aaregall.lab/amazonlinux-graalvm:latest
Define the following environment variables on the deployment host.
export AWS_REGION=...
sam deploy --region $AWS_REGION
sam logs -n SpringCloudFunctionLambda --stack-name aws-spring-cloud-function-kotlin-reactive-sample
sam delete SpringCloudFunctionLambda