You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'sam build' assigns incorrect timestamps to files. The original files have today's timestamp. I only have one folder to build (a serverless function). The source is written in typescript and built to dist. The dist folder content and the package.json file have the correct timestamp in the origin folder but have timestamp of 1985 under ./aws-sam/build.
'sam deploy' cannot deploy the package because of the incorrect timestamps.
Steps to reproduce
Provide steps to replicate.
run: sam build
run: find . -not -newerat "1990-12-31 23:59:59"
The last command shows any files with a timestamp before 1990. for me this lists the following files:
./.aws-sam/build/GetItoStaticDataFunction/dist/app.js.map
./.aws-sam/build/GetItoStaticDataFunction/dist/app.js
./.aws-sam/build/GetItoStaticDataFunction/package.json
Please provide command output with --debug flag set.
Expected result
Files should contain the same timestamp as the originals
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Ok so this is an issue with npm pack. The file stamps are lost when simply using "npm pack" in the lambda function folder. The behavior is discussed here: npm/npm#19968. The change was intended (noMTime flag used with node-tar).
The problem I have is that 'sam deploy' gives the error: "ZIP does not support timestamps before 1980"
Sorry, I'm running down the wrong path of diagnosis for my issue. The problem I have is calling the commands from python using the subprocess module. I've yet to figure out why.
Running sam build and sam deploy works fine when run directly from the command line.
Any help with python would be appreciated though! :)
Description
'sam build' assigns incorrect timestamps to files. The original files have today's timestamp. I only have one folder to build (a serverless function). The source is written in typescript and built to dist. The dist folder content and the package.json file have the correct timestamp in the origin folder but have timestamp of 1985 under ./aws-sam/build.
'sam deploy' cannot deploy the package because of the incorrect timestamps.
Steps to reproduce
Provide steps to replicate.
run: sam build
run: find . -not -newerat "1990-12-31 23:59:59"
The last command shows any files with a timestamp before 1990. for me this lists the following files:
./.aws-sam/build/GetItoStaticDataFunction/dist/app.js.map
./.aws-sam/build/GetItoStaticDataFunction/dist/app.js
./.aws-sam/build/GetItoStaticDataFunction/package.json
Please provide command output with
--debug
flag set.Expected result
Files should contain the same timestamp as the originals
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 0.52.0build log:
buildLog.txt
The text was updated successfully, but these errors were encountered: