Skip to content

Commit

Permalink
add timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenkhavi committed Dec 22, 2023
1 parent 72ff81d commit 9a3a315
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

iam_deploy:
needs: build_asset
name: Deploy IAM Task execution Role Development
name: Deploy IAM Lambda Role
runs-on: ubuntu-latest
environment: Development
permissions:
Expand Down
3 changes: 2 additions & 1 deletion infra/stacks/lambda-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Role,
ServicePrincipal,
} from 'aws-cdk-lib/aws-iam';
import { Stack } from 'aws-cdk-lib';
import { Duration, Stack } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import {
AWS_ACCOUNT_ID,
Expand All @@ -22,6 +22,7 @@ export class LambdaStack extends Stack {
new Function(this, getResourceId('LambdaFunction', name), {
runtime: Runtime.NODEJS_20_X,
code: Code.fromAsset(`../dist/apps/${name}`),
timeout: Duration.seconds(50), // ? https://stackoverflow.com/questions/36419442/the-role-defined-for-the-function-cannot-be-assumed-by-lambda
environment: {},
handler: 'main.handler',
role: Role.fromRoleName(
Expand Down

0 comments on commit 9a3a315

Please sign in to comment.