Volodymyr RT
Volodymyr RT

Reputation: 347

Lambda functions does not appear on AWS Console when I deploy from VSCode with Serverless Deploy

My problem is that if I write the Lambda function in VSCode I cannot deploy it to AWS console.

I have an AWS account and provided credentials to use in VSCode. Just testing the deployment of simple Lambda function to AWS Console with serverless deploy command. So far no success. It creates the bucket on S3 and put zip code there.

ConsoleTest function was created manually in AWS Lambda Console. enter image description here

My serverless.yml looks like this:

service: myservice
provider:
  name: aws
  runtime: nodejs12.x


functions:
  hello:
    handler: handler.hello
    events:
      - http:
         path: users/create
         method: get

Result in terminal (I get correctly JSON response) enter image description here

I was following the official guide: https://serverless.com/framework/docs/providers/aws/guide/deploying/

Any help, please?

Upvotes: 2

Views: 2195

Answers (2)

Abhijeet Gite
Abhijeet Gite

Reputation: 89

enter image description here

Change the zone as shown in image.

Upvotes: 1

Volodymyr RT
Volodymyr RT

Reputation: 347

Found a solution. Problem was that it created the wrong region. I also installed AWS Cli and specified region into a config file, but added region property to the provider. Not sure which one helped, because basically they do the same function. When I put

service: myservice
provider:
  name: aws
  runtime: nodejs12.x
  stage: development
  region: eu-central-1

Everything started to work correctly and deploy to my AWS console.

Upvotes: 6

Related Questions