Getting error "Request is missing Authentication Token" on serverless deploy for af-south-1 region

2

We are using buildspec and serverless to deploy our lambdas to was. It was working fine till early morning India time. But in post build, started seeing the error "Request is missing Authentication Token".

``

version: 0.2

phases:
   install:
      commands:
         - npm install -g serverless@3.13.0
   build:
      commands:
         - env="dev" && region="af-south-1"
         - echo $CODEBUILD_WEBHOOK_HEAD_REF
         - if [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/main" ]; then env="prod"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/uat" ]; then env="uat"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/dev" ]; then env="dev"; fi
         - npm install
         - npm run build
         - rm -rf node_modules
         - npm install --production
   post_build:
      commands:
         - env="dev" && region="af-south-1"
         - echo $CODEBUILD_WEBHOOK_HEAD_REF

         - if [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/main" ]; then env="prod"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/uat" ]; then env="uat"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/dev" ]; then env="dev"; region="af-south-1"; elif [ "$CODEBUILD_WEBHOOK_HEAD_REF" = "refs/heads/stage" ]; then env="stage"; fi
         - echo "deploying for env=$env region=$region"

         - serverless deploy --stage $env --region $region --verbose


Here's the error we are getting.

[Container] 2022/11/28 10:36:58 Running command serverless deploy --stage $env --region $region --verbose
To ensure safe major version upgrades ensure "frameworkVersion" setting in service configuration (recommended setup: "frameworkVersion: ^3.13.0")


Warning: Invalid configuration encountered
  at 'provider': unrecognized property 'package'

Learn more about configuration validation here: http://slss.io/configuration-validation

Deploying test-authorizer to stage dev (af-south-1)

Excluding development dependencies for service package

× Stack test-authorizer-dev failed to deploy (0s)

We tried to deploy on us-east-1, but it worked, it just stopped working for af-south-1

Checked the following already

  1. Checking the deploy role for right permissions
  2. Checking the STS token - it is active
  3. Also tried to change the deployment environment on codebuild. It didn't work
  • exactly same is happening to us: previously deployed lambda in us-east-2 doesn't update but newly created lambdas at us-east-1 deploy correctly and update correctly

1 Answer
0

If you are using aws-sdk-js library there was a change released that broke serverless deployments (yesterday) and you want to ensure you are not using the latest version. Downgrade to aws-sdk version to v2.1261.0. It worked for us...

Details here: https://github.com/aws/aws-sdk-js/issues/4286

Ransel
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions