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 log retention #1048

Merged
merged 7 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/aws-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: AWS Authentication
env:
AWS_MFA_ARN: ${{ secrets.RESTRICTED_AWS_MFA_ARN }}
Expand Down Expand Up @@ -68,6 +77,15 @@ jobs:
export AWS_SECRET_ACCESS_KEY=$(cat /tmp/creds_json | jq .Credentials.SecretAccessKey| tr -d '"')
export AWS_SESSION_TOKEN=$(cat /tmp/creds_json | jq .Credentials.SessionToken|tr -d '"')
sls deploy --force



- name: Remove the cron job scheduler in staging (eu-west-1)
if: "${{ inputs.region == 'eu-west-1' }}"
run: |
export AWS_ACCESS_KEY_ID=$(cat /tmp/creds_json | jq .Credentials.AccessKeyId |tr -d '"')
export AWS_SECRET_ACCESS_KEY=$(cat /tmp/creds_json | jq .Credentials.SecretAccessKey| tr -d '"')
export AWS_SESSION_TOKEN=$(cat /tmp/creds_json | jq .Credentials.SessionToken|tr -d '"')
RULE_NAME=$(aws events list-rule-names-by-target --target-arn arn:aws:lambda:${{ inputs.region }}:${{ secrets.AWS_ACCOUNT_ID }}:function:lambda-perf-dev-functionTriggerDeployerRs --region ${{ inputs.region }} | jq -r '.RuleNames[0]')
echo "Disabling rule ${RULE_NAME}"
aws events disable-rule --name $RULE_NAME --region ${{ inputs.region }}
RULE_NAME=$(aws events list-rule-names-by-target --target-arn arn:aws:lambda:${{ inputs.region }}:${{ secrets.AWS_ACCOUNT_ID }}:function:lambda-perf-dev-resultBuilder --region ${{ inputs.region }} | jq -r '.RuleNames[0]')
echo "Disabling rule ${RULE_NAME}"
aws events disable-rule --name $RULE_NAME --region ${{ inputs.region }}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[workspace]

members = [
"function-trigger-deployer-rs",
"function-deployer-rs",
"function-invoker-rs",
"function-report-log-processor-rs",
"common_lib"
]
resolver = "2"

[profile.release]
opt-level = 'z'
Expand Down
1 change: 1 addition & 0 deletions serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ provider:
role:
name: lambda-perf-${sls:stage}-role-${aws:region}
timeout: 900
logRetentionInDays: 7
iamRoleStatements:
- Effect: Allow
Action: "logs:CreateLogGroup"
Expand Down
Loading