Skip to content

Commit

Permalink
chore(lambda-layer-proxyagent): autobump mechanism (#18788)
Browse files Browse the repository at this point in the history
Add an autobump mechanism similar to the one in
#18780.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Feb 17, 2022
1 parent 6df26e7 commit b5ae377
Show file tree
Hide file tree
Showing 6 changed files with 998 additions and 5 deletions.
Empty file.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/lambda-layer-node-proxy-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ declare const fn: lambda.Function;
fn.addLayers(new NodeProxyAgentLayer(this, 'NodeProxyAgentLayer'));
```

[`proxy-agent`](https://www.npmjs.com/package/proxy-agent) will be installed under `/opt/nodejs/node_modules`.
[`proxy-agent`](https://www.npmjs.com/package/proxy-agent) will be installed under `/nodejs/node_modules`.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# base lambda image
FROM public.ecr.aws/lambda/nodejs:latest

ARG PROXY_AGENT_VERSION=5.0.0

USER root
RUN mkdir -p /opt
WORKDIR /tmp
Expand All @@ -19,7 +17,8 @@ RUN yum update -y \
#

RUN mkdir -p /opt/nodejs
RUN cd /opt/nodejs && npm install proxy-agent@${PROXY_AGENT_VERSION}
COPY package*.json /opt/nodejs/
RUN cd /opt/nodejs && npm ci && rm package*.json

#
# create the bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail

cd $(dirname $0)

echo ">> Building AWS Lambda layer inside a docker image..."
echo ">> Building AWS Lambda layer inside a docker image for Proxy Agent..."

TAG='aws-lambda-node-proxy-agent'

Expand Down
Loading

0 comments on commit b5ae377

Please sign in to comment.