Skip to content

Commit

Permalink
infra updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Kedharkb committed Mar 17, 2024
1 parent 7f4087b commit 4609d91
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 24 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/create-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,10 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ZENITSU_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ZENITSU_SECRET_KEY }}
aws-access-key-id: ${{ secrets.TANJIRO_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.TANJIRO_SECRET_KEY }}
aws-region: 'eu-central-1'

- name: Assume IAM Role
id: assume-role
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::381492264897:role/lambda_role
role-duration-seconds: 3600
aws-region: eu-central-1
env:
AWS_DEFAULT_OUTPUT: json

- name: Check Assumed Role
run: aws sts get-caller-identity

- name: Check policies
run: aws iam list-attached-role-policies --role-name lambda_role

- name: Install CDK dependencies
run: npm install -g aws-cdk

Expand Down
4 changes: 1 addition & 3 deletions infrastructure/bin/infrastructure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ new InfrastructureStack(app, 'InfrastructureStack', {
account: '381492264897',
region: 'eu-central-1'
}
});

app.synth()
});
1 change: 0 additions & 1 deletion infrastructure/lib/infrastructure-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ export class InfrastructureStack extends cdk.Stack {

pipeline.addStage(backendStage)


}
}
4 changes: 2 additions & 2 deletions infrastructure/lib/stacks/api-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export class ApiStack extends cdk.Stack {

new Function(this, 'ApiLambda', {
runtime: Runtime.PYTHON_3_10,
handler: 'app.lambda_handler',
code: Code.fromAsset('../src/lambdas/api_lambda/api_lambda'),
handler: 'api_lambda.app.lambda_handler',
code: Code.fromAsset('../src/lambdas/api_lambda/'),
timeout: Duration.minutes(5)
});
}
Expand Down
Empty file added src/lambdas/api_lambda/main.py
Empty file.

0 comments on commit 4609d91

Please sign in to comment.