Skip to content

Commit

Permalink
Add SAM Template outputs for Lambda function ARN and IAM Role ARN (#552)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Andrea Spacca <[email protected]>
  • Loading branch information
girodav and Andrea Spacca authored Jan 17, 2024
1 parent 7cc2c0e commit 7af1dd8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .internal/aws/cloudformation/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions .internal/aws/cloudformation/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .internal/aws/scripts/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 7af1dd8

Please sign in to comment.