Skip to content

Commit

Permalink
Merge pull request #2 from mackerelio-labs/modify/adapt_lambda_custom…
Browse files Browse the repository at this point in the history
…runtime

Adapt AWS Lambda Custom Runtime
  • Loading branch information
mdsboy committed Jul 13, 2023
2 parents 0b9f05e + f6da913 commit 47c10b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ $(OUTPUT_DIR)/lambda.zip: $(OUTPUT_DIR)/linux/$(NAME)

.PHONY: lambda-artifact
lambda-artifact: $(OUTPUT_DIR)/lambda.zip

$(OUTPUT_DIR)/bootstrap.zip: $(OUTPUT_DIR)/linux/$(NAME)
mv $(OUTPUT_DIR)/linux/$(NAME) $(OUTPUT_DIR)/linux/bootstrap
zip -j $(OUTPUT_DIR)/bootstrap.zip $(OUTPUT_DIR)/linux/bootstrap

.PHONY: lambda-bootstrap-artifact
labmda-boostrap-artifact: $(OUTPUT_DIR)/bootstrap.zip
2 changes: 1 addition & 1 deletion cmd/mackerel-sql-metric-collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func detectExecutorName() string {
return e

}
if os.Getenv("AWS_EXECUTION_ENV") != "" {
if os.Getenv("AWS_EXECUTION_ENV") != "" || os.Getenv("AWS_LAMBDA_RUNTIME_API") != "" {
return lambda.Name

}
Expand Down

0 comments on commit 47c10b3

Please sign in to comment.