We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4afe6d8 commit 8a8c1e3Copy full SHA for 8a8c1e3
1 file changed
scripts/attach-layer-to-lambda-function.sh
@@ -0,0 +1,15 @@
1
+#!/usr/bin/env bash
2
+
3
+set -euo pipefail
4
5
+FUNCTION_NAME=$1
6
7
+echo "Getting ARN of newest Sentry lambda layer..."
8
+LAYER_ARN=$(aws lambda list-layer-versions --layer-name SentryPythonServerlessSDKLocalDev --query "LayerVersions[0].LayerVersionArn" | tr -d '"')
9
+echo "Done getting ARN of newest Sentry lambda layer $LAYER_ARN."
10
11
+echo "Attaching Lamba layer to function $FUNCTION_NAME..."
12
+aws lambda update-function-configuration --function-name "$FUNCTION_NAME" --layers "$LAYER_ARN" --no-cli-pager
13
+echo "Done attaching Lamba layer to function $FUNCTION_NAME."
14
15
+echo "All done. Have a nice day!"
0 commit comments