Category : aws-sam-cli

We are developing locally using SAM Local to invoke a Lambda in an API Gateway. SAM Local does this using a Docker container (setup as close to the Lambda node runtime as possible). We want this Lambda to access some data in an API Mocking service in the shape of some Node express servers running ..

Read more

Did anyone have any luck trying to properly install docker on Fedora 32 and run sam local commands? When I try to execute I get the following error every time: ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module ‘/var/task/…. The code runs perfectly on a debian based system, so it is not a problem with the ..

Read more

In the below docker file: FROM alpine:latest ENV HOME /home/samcli ENV PATH $HOME/.local/bin:$PATH RUN mkdir /root/bin /aws; apk add –no-cache groff less bash python jq curl py-pip tzdata RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime RUN apk add –no-cache –virtual .build-deps gcc python2-dev python3-dev linux-headers musl-dev && pip install –upgrade pip; adduser samcli -Du 5566; chown -R ..

Read more

Below is the Dockerfile for aws sam: FROM buildpack-deps:stable ARG PYTHON_VERSION=3.7.4 # Update and allow for apt over HTTPS RUN apt-get update && apt-get install -y apt-utils RUN apt-get install -y apt-transport-https # download and build Python 3.7, install basic Python libraries # (this predates pipenv so a mixture of dependencies) ADD requirements.txt /requirements.txt RUN ..

Read more

I am using AWS SAM and dockerized the lambdas. Here is my Dockerfile FROM python:3.7-alpine RUN apk update && apk upgrade && apk add bash && apk add –no-cache –virtual build-deps build-base gcc && pip install aws-sam-cli && apk del build-deps WORKDIR /app/ RUN ls COPY bin/sam_entrypoint.sh bin/ COPY lambda/hello_world/requirements.txt . RUN pip install -r ..

Read more