Update template.yaml
and make build
to support build-time-only resources
#201
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds some logic to the build/deploy process that allows the SAM template to differ between dev-time and deploy-time. This is done by adding a new kind of comment (
#*
) to lines that should be part of the build but not included during dev, and having the build command strip those comments out before building.It also updates dependencies and test invocation to get rid of some deprecation warnings. Most notably, we no longer need AWS SDK v2, which saves nearly 9,000 lines among the the three
package-lock.json
files alone.To test:
make clean
make serve
make build
template.yaml
is not modified afterward (i.e., put back the way it was).aws-sam/build/apiDependencies
to make sure all the runtime dependencies are in there.aws-sam/build/
to make sure they do not have dependenciesnode
, not the functions inlambdas
node_modules
directory, but they should be emptyRemember to
make clean
again (or at leastrm -rf .aws-sam
) to make sure you don't leave the build behind.