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

Webpack update changes only after a long time #349

Open
IgorAlexeew opened this issue Dec 21, 2022 · 2 comments
Open

Webpack update changes only after a long time #349

IgorAlexeew opened this issue Dec 21, 2022 · 2 comments

Comments

@IgorAlexeew
Copy link

After the changes in the code, the following is output

Issues checking in progress...
No issues found.

But at the same time, there is no change in the lambdas, they are executed in the old way. And they are updated only after 5-10 minutes

service: peeranha-api

custom:
  stage: ${opt:stage, 'offline'}
  region: ${file(./stages/${self:custom.stage}.yml):region}
  bundle:
    linting: false
    forceExclude: electron
  serverless-offline:
    httpPort: 4000
    noPrependStageInUrl: true
    ignoreJWTSignature: true
  serverless-offline-sns:
    port: 4002
    debug: true
    accountId: 123456789012
  s3:
    host: localhost
    directory: ./s3-local
  dynamodb:
    stages:
      - offline
    start:
      port: 4659
      inMemory: true
      migrate: true

provider:
  name: aws
  region: ${file(./stages/${self:custom.stage}.yml):region}
  runtime: nodejs16.x
  environment: ${file(./stages/${self:custom.stage}.yml):environment}
  memorySize: 512
  timeout: 10
  logRetentionInDays: 90
  lambdaHashingVersion: 20201221 # https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2
  logs:
    httpApi: true
  httpApi:
    # metrics: true # Enable if you need
    cors: true
    authorizers:
      auth-user:
        type: request
        resultTtlInSeconds: 0
        functionName: auth-user
        identitySource: ["$request.header.Authorization"]
  iam:
    role:
      statements:
        - Effect: Allow
          Action:
            - secretsmanager:GetSecretValue
            - dynamodb:DescribeTable
            - dynamodb:Query
            - dynamodb:Scan
            - dynamodb:GetItem
            - dynamodb:PutItem
            - dynamodb:UpdateItem
            - dynamodb:DeleteItem
            - s3:PutObject
            - sns:Publish
          Resource: "*"

functions:
  ...

resources:
  ...

package:
  individually: true

plugins:
  - serverless-dotenv-plugin
  - serverless-bundle
  - serverless-offline-sns
  - serverless-dynamodb-local
  - serverless-s3-local
  - serverless-offline
@IgorAlexeew
Copy link
Author

This error occurs only with the latest versions of the serverless-offline, with version 8.8.1 everything is ok

@scott-clary
Copy link

I've come across the same issue

frameworkVersion: '3'

package:
  individually: true

provider:
  name: aws
  runtime: nodejs18.x
  region: ca-central-1
  httpApi:
    cors: true
    authorizers:
      customAuthorizer:
        type: request
        functionName: customAuthorizer
        identitySource: $request.header.Authorization
        enableSimpleResponses: true
        payloadVersion: '2.0'

  iam:
    role:
      statements:
        - Effect: Allow
          Action: 'secretsmanager:GetSecretValue'
          Resource: '*'
        - Effect: Allow
          Action:
            - dynamodb:Query
            - dynamodb:Scan
            - dynamodb:GetItem
            - dynamodb:PutItem
          Resource: "*"
        - Effect: Allow
          Action:
            - cognito-idp:AdminConfirmSignUp
            - cognito-idp:AdminCreateUser
            - cognito-idp:AdminInitiateAuth
            - cognito-idp:SignUp
            - cognito-idp:AdminRespondToAuthChallenge
            - cognito-idp:AdminUserGlobalSignOut
          Resource: "*"

plugins:
  - serverless-dotenv-plugin
  - serverless-bundle
  - serverless-offline

custom:
  bundle:
    disableForkTsChecker: true
    esbuild: true
    packager: yarn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants