--- version: '0.2' phases: install: runtime-versions: python: 3.9 pre_build: commands: - echo start lambda function build ${SourceFolder} - build_root=$CODEBUILD_SRC_DIR/src/lambda - cd $build_root - file=${SourceFolder}/handler.py; - artifact=${build_root}/${file}; - pip install --upgrade pip build: commands: - if test -f ${SourceFolder}/handler.py; then echo "------------------------------------"; echo $PWD; echo "------------------------------------"; ls; echo "------------------------------------"; echo ${SourceFolder} packaging to be done; echo "------------------------------------"; echo artifact is ${artifact}; echo "------------------------------------"; ls; fi; - echo "------------------------------------"; - echo done artifacts: files: - $artifact discard-paths: yes