Skip to content

Commit

Permalink
Use default name for aws_region
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Apr 18, 2024
1 parent 9304c41 commit eb081b3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions integrations/amazon-security-lake/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ $(VIRTUAL_ENV):
.ONESHELL:
pack_src:
@cd src
@zip ../$(ZIP_NAME).zip run.py wazuh_ocsf_converter.py
@zip ../$(ZIP_NAME).zip lambda_function.py wazuh_ocsf_converter.py
@zip ../$(ZIP_NAME).zip models -r

clean:
@rm -rf $(VIRTUAL_ENV)
@rm -rf $(VIRTUAL_ENV)
@py3clean .
6 changes: 3 additions & 3 deletions integrations/amazon-security-lake/aws-lambda.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
FROM amazon/aws-lambda-python:3.12

# Copy requirements.txt
COPY requirements.txt ${LAMBDA_TASK_ROOT}
COPY requirements.aws.txt ${LAMBDA_TASK_ROOT}

# Install the specified packages
RUN pip install -r requirements.txt
RUN pip install -r requirements.aws.txt

# Copy function code
COPY src ${LAMBDA_TASK_ROOT}

# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
CMD [ "run.lambda_handler" ]
CMD [ "lambda_function.lambda_handler" ]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ output {
id => "output.s3"
access_key_id => "${AWS_ACCESS_KEY_ID}"
secret_access_key => "${AWS_SECRET_ACCESS_KEY}"
region => "${AWS_REGION}"
region => "${AWS_DEFAULT_REGION}"
endpoint => "http://s3.ninja:9000"
bucket => "${AWS_BUCKET}"
codec => "json_lines"
Expand Down
2 changes: 1 addition & 1 deletion integrations/amazon-security-lake/src/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
service_name='s3',
aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'],
aws_secret_access_key=os.environ['AWS_SECRET_ACCESS_KEY'],
region_name=os.environ['AWS_REGION'],
region_name=os.environ['AWS_DEFAULT_REGION'],
endpoint_url='http://s3.ninja:9000',
)

Expand Down
4 changes: 2 additions & 2 deletions integrations/docker/amazon-security-lake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ services:
MONITORING_ENABLED: false
AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE"
AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
AWS_REGION: "us-east-1"
AWS_DEFAULT_REGION: "us-east-1"
AWS_BUCKET: "wazuh-indexer-aux-bucket"
ASL_BUCKET: "wazuh-indexer-amazon-security-lake-bucket"
ports:
Expand Down Expand Up @@ -116,7 +116,7 @@ services:
environment:
AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE"
AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
AWS_REGION: "us-east-1"
AWS_DEFAULT_REGION: "us-east-1"
AWS_BUCKET: "wazuh-indexer-amazon-security-lake-bucket"
volumes:
- ../amazon-security-lake/src:/var/task
Expand Down

0 comments on commit eb081b3

Please sign in to comment.