version: 0.2 env: variables: DOTNET_SDK_URL: "https://download.visualstudio.microsoft.com/download/pr/807f9d72-4940-4b1a-aa4a-8dbb0f73f5d7/cb666c22a87bf9413f29615e0ba94500/dotnet-sdk-6.0.200-linux-x64.tar.gz" parameter-store: S3_BUCKET: "/ImageRecognition/ImageRecognitionArtifactStore" phases: install: commands: - yum update -y && yum install -y clang krb5-devel openssl-devel libicu llvm zip - yum install -y tar gzip - curl -LO https://dot.net/v1/dotnet-install.sh - chmod +x dotnet-install.sh - ./dotnet-install.sh -Channel 7.0 -Version latest - export PATH=/root/.dotnet:$PATH - dotnet tool install -g Amazon.Lambda.Tools - export PATH="$PATH:/root/.dotnet/tools" build: commands: - cd ./Application/s3Trigger - dotnet publish "s3Trigger.csproj" -r linux-x64 -c Release --self-contained true --output /publish - cp /publish/bootstrap bootstrap - zip s3Trigger.zip bootstrap - dotnet lambda package-ci --template serverless.template --output-template updated.template --s3-bucket $S3_BUCKET --s3-prefix s3Trigger artifacts: files: - ./Application/s3Trigger/updated.template discard-paths: yes