anchor.diff:  
   
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  -:: int validatePackage(string bodyPath)
  -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  -:validatePackage
  +:: int validatePackageDir(string packageDir)
  +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  +:validatePackageDir
   
   SETLOCAL EnableDelayedExpansion
   
   :: Remove double quotes from the body path
  -SET bodyPath=%bodyPath:"=%
  +SET packageDir=%packageDir:"=%
   
   :: Make sure the provided path exists
  -IF NOT EXIST "%bodyPath%" (
  -    ECHO Error: Could not find the package "%bodyPath%" >> "%ERROR_FILE%"
  -    EXIT /B 1
  -)
  -
  -:: Make sure the provided path is a file, not a directory
  -IF EXIST "%bodyPath%\*" (
  -    ECHO Error: The provided package must be a .zip file. >> "%ERROR_FILE%"
  -    ECHO "%bodyPath%" is a directory. >> "%ERROR_FILE%"
  -    EXIT /B 1
  -)
  -
  -:: Make sure the provided path is a zip file
  -SET ext=""
  -FOR %%f IN ("%bodyPath%") DO SET ext=%%~xf
  -IF NOT %ext%==.zip (
  -    ECHO Error: The provided package must be a .zip file. >> "%ERROR_FILE%"
  -    ECHO "%bodyPath%" is a %ext% file. >> "%ERROR_FILE%"
  -    EXIT /B 1
  -)
  -
  -EXIT /B 0
  -
  -
  -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  -:: int uploadPackage(string key, string bodypath, string profile, string options="")
  +IF NOT EXIST "%packageDir%" (
  +    ECHO Error: Could not find the path "%packageDir%" >> "%ERROR_FILE%"
  +    EXIT /B 1
  +)
  +
  +:: Make sure the provided path is a directory, not a file
  +IF NOT EXIST "%packageDir%\*" (
  +    ECHO Error: The provided path must be a directory. >> "%ERROR_FILE%"
  +    ECHO "%packageDir%" is a file. >> "%ERROR_FILE%"
  +    EXIT /B 1
  +)
  +
  +:: Make sure the directory is not empty
  +SET numFiles=0
  +FOR %%f IN ("%packageDir%\*") DO SET /A numFiles+=1
  +IF %numFiles%==0 (
  +    ECHO No files were found in the provided directory. >> "%ERROR_FILE%"
  +    ECHO Lambda package creation cancelled. >> "%ERROR_FILE%"
  +    EXIT /B 1
  +)
  +
  +EXIT /B 0
  +
  +
  +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  +:: int compressPackage(string packageDir)
  +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  +:compressPackage
  +
  +SETLOCAL EnableDelayedExpansion
  +
  +SET compressErrFile=%tempDir%\compressErr.txt
  +
  +:: Remove any trailing slash from the provided directory path
  +SET hasSlash=false
  +IF %packageDir:~-1%==/ SET hasSlash=true
  +IF %packageDir:~-1%==\ SET hasSlash=true
  +IF %hasSlash%==true SET packageDir=%packageDir:~0,-1%
  +
  +:: Compress the files in the provided directory using 7-Zip
  +ECHO.
  +ECHO Compressing the contents of the provided directory...
  +SET oldDir=%CD%
  +CD /D %packageDir%      &REM Without changing directories, 7-Zip would compress all files inside a parent folder, but Lambda expects files at the root
  +7z a -tzip -mx9 -mmt "%PACKAGE_FILE%" "*" > NUL 2> "%compressErrFile%"
  +CD /D %oldDir%
  +
  +:: If any 7-Zip errors occurred then just log them and early exit
  +FOR /F %%i IN ("%compressErrFile%") DO SET size=%%~zi
  +IF /I %size% GTR 0 (
  +    ECHO Compression failed with error message: >> "%ERROR_FILE%"
  +    TYPE "%compressErrFile%" >> "%ERROR_FILE%"
  +    DEL "%compressErrFile%"
  +    EXIT /B 1
  +) ELSE (
  +    ECHO Lambda package created^^!
  +)
  +DEL "%compressErrFile%"
  +
  +EXIT /B 0
  +
  +
  +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  +:: int uploadPackage(string key, string profile, string options="")
   ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   :uploadPackage
   
  
positive.code: aws s3api put-object ^
      --bucket %bucket% ^
      --key %key% ^
      --body "%bodyPath%" ^
      --acl private ^
      --storage-class STANDARD ^
      --server-side-encryption aws:kms ^
  
negative.code: FOR /F "usebackq tokens=*" %%a IN ('%arg%') DO (SET arg=%%~a)   &:: Remove double quotes
  IF "%arg%"=="" GOTO continueParse
  
  :: Parse part directory path
  SET good=true
  IF "%arg:~0,1%"=="-" (SET good=false)
  IF "%arg:~0,1%"=="/" (SET good=false)
  IF %good%==true (
      IF DEFINED packageDir (
          ECHO Error: You may provide the path to only one directory with package files to upload! >> "%ERROR_FILE%"
          EXIT /B 1
      ) ELSE (
          SET packageDir=%arg%
          SHIFT
          GOTO loop
      )
  )
  
  :: Parse bucket name
  