diff --git a/.internal/aws/cloudformation/application.yaml b/.internal/aws/cloudformation/application.yaml index 0f349de4..450ae2bd 100644 --- a/.internal/aws/cloudformation/application.yaml +++ b/.internal/aws/cloudformation/application.yaml @@ -93,3 +93,10 @@ Metadata: LicenseUrl: %codeUri%/LICENSE.txt HomePageUrl: https://github.com/elastic/elastic-serverless-forwarder SourceCodeUrl: https://github.com/elastic/elastic-serverless-forwarder +Outputs: + EsfLambdaFunctionARN: + Description: ARN of the ESF Lambda Function + Value: !GetAtt ApplicationElasticServerlessForwarder.Arn + EsfLambdaFunctionRoleARN: + Description: ARN of the IAM role associated with the ESF Lambda function + Value: !GetAtt ApplicationElasticServerlessForwarderRole.Arn diff --git a/.internal/aws/cloudformation/template.yaml b/.internal/aws/cloudformation/template.yaml index b7364115..e9409d31 100644 --- a/.internal/aws/cloudformation/template.yaml +++ b/.internal/aws/cloudformation/template.yaml @@ -127,3 +127,10 @@ Metadata: ReadmeUrl: %codeUri%/README.md HomePageUrl: https://github.com/elastic/elastic-serverless-forwarder SourceCodeUrl: https://github.com/elastic/elastic-serverless-forwarder +Outputs: + EsfLambdaFunctionARN: + Description: ARN of the ESF Lambda Function + Value: !GetAtt ElasticServerlessForwarderApplication.Outputs.EsfLambdaFunctionARN + EsfLambdaFunctionRoleARN: + Description: The name of ESF Lambda Function + Value: !GetAtt ElasticServerlessForwarderApplication.Outputs.EsfLambdaFunctionRoleARN diff --git a/.internal/aws/scripts/dist.sh b/.internal/aws/scripts/dist.sh index c22fa64c..58d9583f 100755 --- a/.internal/aws/scripts/dist.sh +++ b/.internal/aws/scripts/dist.sh @@ -3,7 +3,7 @@ # or more contributor license agreements. Licensed under the Elastic License 2.0; # you may not use this file except in compliance with the Elastic License 2.0. -set -e +set -ex echo " AWS CLI (https://aws.amazon.com/cli/), AWS SAM CLI (https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html), docker and Python3.9 with pip3 required" echo " Please, execute from root folder of the repo" @@ -38,7 +38,7 @@ trap "rm -rf ${TMPDIR}" EXIT aws s3api get-bucket-location --bucket "${BUCKET}" --region "${REGION}" || aws s3api create-bucket --acl private --bucket "${BUCKET}" --region "${REGION}" --create-bucket-configuration LocationConstraint="${REGION}" # Check if region is in AWS GovCloud and create bucket arn -if [[ ${REGION} == *"$gov"* ]]; then +if [[ "${REGION}" == *gov* ]]; then BUCKET_ARN="arn:aws-us-gov:s3:::${BUCKET}" AWS_OR_AWS_GOV="aws-us-gov" else diff --git a/CHANGELOG.md b/CHANGELOG.md index d0681721..8b0ac5db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ -### v1.11.0 - 2023/11/27 +### v1.11.0 - 2023/12/08 ##### Features * Add user agent with information about ESF version and host environment: [#537](https://github.com/elastic/elastic-serverless-forwarder/pull/537) * Remove calls to `sqs.DeleteMessage` and refactor storage decorators: [#544](https://github.com/elastic/elastic-serverless-forwarder/pull/544) +* Add outputs for Lambda function ARN and IAM Role ARN [#552](https://github.com/elastic/elastic-serverless-forwarder/pull/552) ##### Bug fixes * Fix regression when both `json_content_type: single` and `expand_event_list_from_field` are set: [#553](https://github.com/elastic/elastic-serverless-forwarder/pull/553)