You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: collector/README.md
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,38 @@ For example, if you want to add the extension `foo`, the file providing this ext
52
52
53
53
You can provide your addition as a pull-request to this repository. Before doing so, please also read through the details of [Contributing](#contributing) to this project.
54
54
55
+
## Build and publish your own OpenTelemetry Collector Lambda layer
56
+
To build and publish collector Lambda layer from your own fork/branch into your own AWS account,
57
+
you can use the `Publish Collector Lambda Layer` workflow which can only be triggered manually.
58
+
59
+
To do that, first you need to
60
+
- Create Github's OIDC provider in your (or target) AWS account (for more details, you can check [here](https://github.com/aws-actions/configure-aws-credentials?oidc))
61
+
- And create an AWS IAM Role in the AWS account to be assumed by the `Publish Collector Lambda Layer` workflow from your own OpenTelemetry Lambda repository/fork.
62
+
63
+
To setup those, you can use (copy or load) the AWS CloudFormation template [here](../utils/aws-cloudformation/aws-cf-stack-for-layer-publish.yml).
64
+
Once AWS CloudFormation stack is created from the given template,
65
+
ARN of the created AWS IAM Role to be assumed will be shown as `RoleARN` in the output of the stack, so note it to be used later.
66
+
67
+
After that, you can run the `Publish Collector Lambda Layer` workflow to build the Lambda collector and publish it to the target AWS account as Lambda layer:
68
+
- Specify the architecture of the collector Lambda layer to be published via the `Architecture of the layer to be published` input.
69
+
Available options are `all`, `amd64` and `arm64`.
70
+
The default value is `all` which builds and publishes layer for both of the `amd64` and `arm64` architectures.
71
+
- Specify the AWS region(s) where the collector Lambda layer will be published to via the `AWS Region(s) where layer will be published` input.
72
+
Available options are `all`, `ap-northeast-1`, `ap-northeast-2`, `ap-south-1`, `ap-southeast-1`, `ap-southeast-2`, `ca-central-1`, `eu-central-1`, `eu-north-1`, `eu-west-1`, `eu-west-2`, `eu-west-3`, `sa-east-1`, `us-east-1`, `us-east-2`, `us-west-1`, `us-west-2`.
73
+
The default value is `all` which publishes layer to all the defined AWS regions mentioned above.
74
+
- Specify the AWS IAM Role ARN to be assumed for publishing layer via the `AWS IAM Role ARN to be assumed for publishing layer` input.
75
+
This is the ARN of the AWS IAM Role you have taken from the `RoleARN` output variable of the created AWS CloudFormation stack above.
76
+
This input is **optional** and if not specified, AWS IAM Role ARN to be assumed is tried to be resolved from `OTEL_LAMBDA_LAYER_PUBLISH_ROLE_ARN` secret.
77
+
If it is still not able to resolved (neither this input is specified, nor `OTEL_LAMBDA_LAYER_PUBLISH_ROLE_ARN` secret is defined),
78
+
layer publish job will fail due to missing AWS credentials.
79
+
- Specify the layer version to be appended into layer name via the `Layer version to be appended into the layer name` input
80
+
to be used in the following format: `opentelemetry-lambda-collector-${architecture}-${layer-version}`.
81
+
This input is **optional** and if not specified, layer name is generated in the `opentelemetry-lambda-collector-${architecture}` format without layer version postfix.
82
+
- Specify the build tags to build the collector with a customized set of connectors/exporters/receivers/processors
83
+
via the `Build tags to customize collector build` input.
84
+
This input is **optional** and if not specified, collector is built with the default set of connectors/exporters/receivers/processors.
85
+
Check the [Build Tags](#build-tags) section for the details.
86
+
55
87
## Installing
56
88
To install the OpenTelemetry Collector Lambda layer to an existing Lambda function using the `aws` CLI:
0 commit comments