-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lambda support #14
Conversation
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments, didn't finish reviewing
Dockerfile
Outdated
WORKDIR ${FUNCTION_DIR} | ||
# Copy in the build image dependencies | ||
COPY --from=build-image ${FUNCTION_DIR} ${FUNCTION_DIR} | ||
RUN ls ${FUNCTION_DIR}/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ls required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required but helps to see if required files are present before deploying the image (added bcoz it helped me to debug, we can totally remove all ls
commands)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it increases the image size and what is the final image size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be better to remove, i think it adds an unnecessary layer to image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
DEVELOPER_GUIDE.md
Outdated
2. Run the command in from the directory where Dockerfile and opensearch-reporting-cli-1.0.0.tgz exists. | ||
``` | ||
docker build -t opensearch-reporting-cli . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users might be running this directly after cloning this repo and run npm install
, do we need to dockerignore node_modules
?
or do we expect users create a new directory, download Dockerfile and .tgz
separately, and run docker build?
Also does this line work in mac/windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users might be running this directly after cloning this repo and run npm install, do we need to dockerignore node_modules?
Dockerfile is using opensearch-reporting-cli-1.0.0.tgz
. If someone just clone repo & do npm install then docker build will throw error for not finding this tar file. We need to add dockerignore if we build from source.
do we expect users create a new directory, download Dockerfile and .tgz separately, and run docker build?
When we have this file on opensearch downloads page, we can add step to download tar file in Dockerfile so all user will need is to get Dockerfile and run build command. No need to clone the repo.
does this line work in mac/windows?
yes
also a note we might be able to use babel or babel+webpack to keep ES6 modules in src, babel will build CommonJS for lambda runtime. maybe a todo item in the future to improve code |
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
Co-authored-by: Joshua Li <joshuali925@gmail.com>
Description
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.