Update Lambda container example#786
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the AWS Lambda container example to illustrate how to install the SolarWinds OpenTelemetry Collector Lambda extension for different container architectures (x86_64 vs arm64).
Changes:
- Added a README note prompting users to select platform-appropriate Dockerfile commands for extension installation.
- Added Dockerfile instructions intended to show both x86_64 and arm64 extension installation options.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/aws_lambda_container/README.md | Adds guidance about selecting the correct platform-specific extension install commands. |
| examples/aws_lambda_container/Dockerfile | Attempts to document x86_64 vs arm64 extension installation steps. |
Comments suppressed due to low confidence (1)
examples/aws_lambda_container/Dockerfile:23
- This Dockerfile currently installs both the x86_64 and ARM64 collector extensions (and re-declares the same ARG names). That means an x86_64 build would end up overwriting the x86_64 extension with the ARM64 one (broken at runtime), and an ARM64 build does unnecessary extra download/work. Make the non-target architecture block non-executable (or switch to a TARGETARCH-based conditional).
# For x86_64: Download and extract the latest SolarWinds OTel Lambda extension for x86_64
ARG SOLARWINDS_OTEL_VERSION=0.0.13
ARG SOLARWINDS_OTEL_SHA256=4eb6e521ee043865c27e21faafa0c55bfddd94594689bc1d1ecf9b29298be034
ARG LAYER_ZIP=solarwinds_apm_lambda.zip
ADD --checksum=sha256:${SOLARWINDS_OTEL_SHA256} https://github.com/solarwinds/opentelemetry-lambda/releases/download/layer-collector/${SOLARWINDS_OTEL_VERSION}/opentelemetry-collector-layer-x86_64.zip /tmp/swo-otel-extension.zip
RUN python -m zipfile -e /tmp/swo-otel-extension.zip /opt && rm /tmp/swo-otel-extension.zip
RUN mv /opt/extensions/collector /opt/extensions/otel-extension && chmod +x /opt/extensions/otel-extension
ENV OPENTELEMETRY_COLLECTOR_CONFIG_URI=file:///opt/collector-config/config.yaml
# OR for ARM64: Download and extract the latest SolarWinds OTel Lambda extension for ARM64
ARG SOLARWINDS_OTEL_VERSION=0.0.13
ARG SOLARWINDS_OTEL_SHA256=a44d6aaebe3e21f54a61dff2b75d73feb9a9a606c518f6184c1fe3f84e3779c0
ARG LAYER_ZIP=solarwinds_apm_lambda.zip
ADD --checksum=sha256:${SOLARWINDS_OTEL_SHA256} https://github.com/solarwinds/opentelemetry-lambda/releases/download/layer-collector/${SOLARWINDS_OTEL_VERSION}/opentelemetry-collector-layer-arm64.zip /tmp/swo-otel-extension.zip
RUN python -m zipfile -e /tmp/swo-otel-extension.zip /opt && rm /tmp/swo-otel-extension.zip
RUN mv /opt/extensions/collector /opt/extensions/otel-extension && chmod +x /opt/extensions/otel-extension
ENV OPENTELEMETRY_COLLECTOR_CONFIG_URI=file:///opt/collector-config/config.yaml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update the Lambda container example to show otelcol extension installation for x86_64 vs arm64.