diff --git a/.github/workflows/create-pipeline.yml b/.github/workflows/create-pipeline.yml index 440b35a..32521a9 100644 --- a/.github/workflows/create-pipeline.yml +++ b/.github/workflows/create-pipeline.yml @@ -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 diff --git a/infrastructure/bin/infrastructure.ts b/infrastructure/bin/infrastructure.ts index 1681d34..09295dd 100644 --- a/infrastructure/bin/infrastructure.ts +++ b/infrastructure/bin/infrastructure.ts @@ -9,6 +9,4 @@ new InfrastructureStack(app, 'InfrastructureStack', { account: '381492264897', region: 'eu-central-1' } -}); - -app.synth() \ No newline at end of file +}); \ No newline at end of file diff --git a/infrastructure/lib/infrastructure-stack.ts b/infrastructure/lib/infrastructure-stack.ts index 45e9871..8efe466 100644 --- a/infrastructure/lib/infrastructure-stack.ts +++ b/infrastructure/lib/infrastructure-stack.ts @@ -37,6 +37,5 @@ export class InfrastructureStack extends cdk.Stack { pipeline.addStage(backendStage) - } } diff --git a/infrastructure/lib/stacks/api-stack.ts b/infrastructure/lib/stacks/api-stack.ts index ef7c2f4..4b917a3 100644 --- a/infrastructure/lib/stacks/api-stack.ts +++ b/infrastructure/lib/stacks/api-stack.ts @@ -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) }); } diff --git a/src/lambdas/api_lambda/main.py b/src/lambdas/api_lambda/main.py new file mode 100644 index 0000000..e69de29