-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Feature/ingestion construct (#8)
* initial push of a the construct structure
- Loading branch information
Showing
36 changed files
with
1,714 additions
and
48 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance | ||
* with the License. A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES | ||
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions | ||
* and limitations under the License. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM amazon/aws-lambda-python:latest | ||
|
||
# Installs python, removes cache file to make things smaller | ||
RUN yum update -y && \ | ||
yum install -y python3 python3-dev python3-pip gcc git && \ | ||
rm -Rf /var/cache/yum | ||
|
||
# Copies requirements.txt file into the container | ||
COPY requirements.txt ./ | ||
# Installs dependencies found in your requirements.txt file | ||
RUN pip install --upgrade pip | ||
RUN pip install -r requirements.txt | ||
|
||
# Be sure to copy over the function itself! | ||
COPY . . | ||
|
||
# Points to the handler function of your lambda function | ||
CMD ["lambda.handler"] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import json | ||
import boto3 | ||
|
||
def get_credentials(secret_id: str, region_name: str) -> str: | ||
|
||
client = boto3.client('secretsmanager', region_name=region_name) | ||
response = client.get_secret_value(SecretId=secret_id) | ||
secrets_value = json.loads(response['SecretString']) | ||
|
||
return secrets_value | ||
|
||
def get_credentials_string(secret_id: str, region_name: str) -> str: | ||
|
||
client = boto3.client('secretsmanager', region_name=region_name) | ||
response = client.get_secret_value(SecretId=secret_id) | ||
secrets_value = response['SecretString'] | ||
|
||
return secrets_value |
Oops, something went wrong.