Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for aws govcloud in dist.sh #510

Merged
merged 8 commits into from
Nov 3, 2023

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Oct 27, 2023

What does this PR do?

This PR adds support for publishing elastic serverless forwarder to SAR in AWS GovCloud.
With this PR we are not adding a new config parameter. Instead, we are only checking the given region name to see if it includes gov in the name and set the bucket ARN, bucket resource, and a new AWS_OR_AWS_GOV variable.

In macro.yaml, we are using %awsOrGov% which equals to aws or aws-us-gov to construct resource/ARN. For example: if the region is not in AWS Gov, then resource = f"arn:aws:s3:::{bucket_name_and_object_key}" and if region is in AWS Gov, then resource = f"arn:aws-us-gov:s3:::{bucket_name_and_object_key}".

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.md

Related issues

@kaiyan-sheng kaiyan-sheng self-assigned this Oct 27, 2023
@kaiyan-sheng kaiyan-sheng requested a review from aspacca October 27, 2023 18:29
@github-actions
Copy link

github-actions bot commented Oct 27, 2023

File Coverage Lines Branches Missing
All files 100% 100% 100%
main_aws.py 100% 100% 100%
handlers/__init__.py 100% 100% 100%
handlers/aws/__init__.py 100% 100% 100%
handlers/aws/cloudwatch_logs_trigger.py 100% 100% 100%
handlers/aws/exceptions.py 100% 100% 100%
handlers/aws/handler.py 100% 100% 100%
handlers/aws/kinesis_trigger.py 100% 100% 100%
handlers/aws/replay_trigger.py 100% 100% 100%
handlers/aws/s3_sqs_trigger.py 100% 100% 100%
handlers/aws/sqs_trigger.py 100% 100% 100%
handlers/aws/utils.py 100% 100% 100%
share/__init__.py 100% 100% 100%
share/config.py 100% 100% 100%
share/events.py 100% 100% 100%
share/expand_event_list_from_field.py 100% 100% 100%
share/factory.py 100% 100% 100%
share/include_exlude.py 100% 100% 100%
share/json.py 100% 100% 100%
share/logger.py 100% 100% 100%
share/multiline.py 100% 100% 100%
share/secretsmanager.py 100% 100% 100%
share/utils.py 100% 100% 100%
shippers/__init__.py 100% 100% 100%
shippers/composite.py 100% 100% 100%
shippers/es.py 100% 100% 100%
shippers/factory.py 100% 100% 100%
shippers/logstash.py 100% 100% 100%
shippers/shipper.py 100% 100% 100%
storage/__init__.py 100% 100% 100%
storage/decorator.py 100% 100% 100%
storage/factory.py 100% 100% 100%
storage/payload.py 100% 100% 100%
storage/s3.py 100% 100% 100%
storage/storage.py 100% 100% 100%

Minimum allowed coverage is 100%

Generated by 🐒 cobertura-action against adcc52d

@kaiyan-sheng kaiyan-sheng marked this pull request as ready for review October 30, 2023 19:08
@kaiyan-sheng kaiyan-sheng requested a review from aspacca October 30, 2023 19:34
publish_lambda.sh Outdated Show resolved Hide resolved
publish_lambda.sh Outdated Show resolved Hide resolved
publish_lambda.sh Outdated Show resolved Hide resolved
publish_lambda.sh Outdated Show resolved Hide resolved
publish_lambda.sh Outdated Show resolved Hide resolved
@kaiyan-sheng kaiyan-sheng requested a review from aspacca October 31, 2023 21:15
@kaiyan-sheng kaiyan-sheng merged commit c91d466 into elastic:main Nov 3, 2023
@kaiyan-sheng kaiyan-sheng deleted the support_aws_gov branch November 3, 2023 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants