Deploy the APIs

I checked the lambda functions on AWS console and noticed that the functions’ code size is relatively bigger than the other functions that I’ve created not using the serverless package. (7.5MB to kilobytes)

Does it have to do with the transpile process from Javascript to NodeJS?

Not entirely. The way Serverless Framework does it by default is that each Lambda functions gets the entire package for your application. Say for example, your serverless.yml has a few functions. A package is created for all the functions combined and each Lambda references that larger package. You can change this by asking Serverless Framework to package them individually. The deploy process is longer but the packages are smaller.

my Endpoints: just says None instead of listing them out, anyone know what I missed?

1 Like

nevermind, yaml indenting errors on my part

I hadn’t properly indented the path: and I had removed the colon (:slight_smile: after https… rookie mistakes

If you are having the same issue, just go back and make sure you type it all in correctly or that copy paste works as you expect!

Hi,

I am having trouble deploying the app.

Serverless: Operation failed!
 
  Serverless Error ---------------------------------------
 
  An error occurred: UpdateLambdaFunction - Template error: IAM role notes-app-api-prod-eu-west-1-lambdaRole doesn't exist.

Can you please guide on the next steps.

This might help you.

I didn’t delete anything until I got the error. I guess at this point my only option is to restart from scratch and see if I missed something.

If I can’t get this to work I’ll just have to pay someone to help me walk through it.

Sorry what is the issue you are having?

my issue was resolved, but even after using the web version of the guide I was still having issues.

turns out the mac notes app was auto-correcting quotes (double and single) and messing things up. had to turn off the auto-correct settings. i’m sure other people have run into this before.

1 Like

I have run into an issue when trying to deploy where it says there is a serverless error “The specified bucket does not exist”. Im assuming I made some kind of error when setting up my S3 bucket, but I can’t figure out what is wrong. Any tips for how to fix this would be greatly appreciated!

Hmm sometimes that happens when the deployment fails. Is this happening when you run serverless deploy?

Kind of new to this, but when view the deployed ‘Function code’ in the AWS it’s a real obfuscated mess. Clearly I’m not going to start editing the code inline there but by comparison when I deploy a simple service/function such as that generated with ‘sls create -t aws-nodejs’, the deployed code matches the source code, pretty much (no obfuscation). Just trying to gain a deeper understanding of what’s going on here.

Thanks for reading.

1 Like

Yeah I think this is caused by Webpack here. We are transpiling and packaging it. You can skip this if you want. Just deploy a barebones Lambda function without Webpack and it’ll simply copy over what you have to S3.

When I run serverless deploy i get the error “The specified bucket does not exist”

This usually happens when the S3 bucket that Lambda uses to upload the code has been removed. I would start over in this case, do a serverless remove and then serverless deploy.

I got the error An error occurred: ServerlessDeploymentBucket - API: s3:CreateBucket Access Denied..
I redo from making service using serverless create, but still error occurs.
I posted issue/comment on the GitHub serverless repository. Here the link for detail. https://github.com/serverless/serverless/issues/5288#issuecomment-490712604
Could anybody help me.
Thanks a lot.

The AWS credentials you are using doesn’t seem to have access to create an S3 bucket? Can you double check this?

Hi team, I’m getting this error:

Serverless Error ---------------------------------------

  The serverless deployment bucket "notes-app-api-prod-serverlessdeploymentbucket-9nob5dxvq5hb" does not exist. Create it manually if you want to reuse the CloudFormation stack "notes-app-api-prod", or delete the stack if it is no longer required.

Now, I have no idea where can I configure my S3 bucket…

Hmm it depends when you got this error. This doc on the issue might be helpful:

Hi there,

After deploying I have 2 cloudwatch alarms that wont go away for days:
ConsumedWriteCapacityUnits < 150 for 15 datapoints within 15 minutes.
ConsumedReadCapacityUnits < 150 for 15 datapoints within 15 minutes.
Kinda worried about this? Any fix?