-
Notifications
You must be signed in to change notification settings - Fork 0
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
JASPER-289: Lambda Function Integration #173
Conversation
- Updates to API to redirect traffic to APIGW when conditions are met
…he correct app - Wrap logic of determining method to call inside ApiService to make proxy lambda code simpler - Include cert and key when calling axios request
- Added dars secret in openshift job
- Installed 'qs' package to handle the process easier
…ts routed to BC Gov API - Enable VPC settings for lambda functions - Added DARS secrets
- regex for replacing methodArn to wildcard - hardcoded password - Using * in network interface lambda policy
- name: Parse Resource and Lambda Name | ||
id: parse | ||
run: | | ||
echo "Lambda: ${{ matrix.lambda }}" | ||
RESOURCE=$(echo "${{ matrix.lambda }}" | cut -d'/' -f1) | ||
LAMBDA=$(echo "${{ matrix.lambda }}" | cut -d'/' -f2) | ||
echo "RESOURCE=$RESOURCE" >> $GITHUB_ENV | ||
echo "LAMBDA=$LAMBDA" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide an example of the input being parsed here? I might be able to recommend a better way to parse it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample inputs:
- "auth/authorizer"
- "auth/rotate-key"
- "proxy/proxy-request"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use variable substitution:
echo "RESOURCE=${${{ matrix.lambda }}%%/*}" >> $GITHUB_ENV
echo "LAMBDA=${${{ matrix.lambda }}##*/}" >> $GITHUB_ENV
Example for how it works in bash:
$ export matrix_lambda="auth/authorizer"
# Get everything before the first '/'
$ echo "RESOURCE=${matrix_lambda%%/*}"
RESOURCE=auth
# Get everything after the last '/'
$ echo "LAMBDA=${matrix_lambda##*/}"
LAMBDA=authorizer
|
Pull Request for JIRA Ticket: JASPER-289
Issue ticket number and link
https://jira.justice.gov.bc.ca/browse/JASPER-289
Description
Infrastructure
proxy
resource to handle all incoming requestsrotate-key
lambda rotates its keyproxy
lambda function insteaddars
secretAPI (backend)
AWS (lambda functions)
proxy
handler which will handle all trafficType of change
How Has This Been Tested?
Test Configuration:
Checklist: