---
# System prepended metadata

title: Serverless at AWS

---

**Link to the workshop:** https://catalog.us-east-1.prod.workshops.aws/join?access-code=e264-094074-b7

**Region**
We will be working in **us-west-2**



## Workshop notes

If you are getting stuck during the lab, please refer to the notes below for a helping hand...


**Initial Setup**

Make sure to create a Cloud9 environment and run the setup script as per "Initial Setup" instructions.

https://catalog.us-east-1.prod.workshops.aws/event/dashboard/en-US/workshop/initial-setup


**Optional - Test locally**

Make sure that you update your env.json file with the name of your DynamoDB table, otherwise the local invocation of the Lambda function will fail.

**Step 3b - Secure the API**

You may get prompted multiple times with "*UsersFunction has no authentication. Is this okay? [y/N]*" when running `sam build && sam deploy --guided`. 

Press enter each time and eventually you will move to the next prompt.

**Step 3d - Verify Authorization**

If you are having problems with the `aws cognito-idp initiate-auth ...` commmand suggesting you have an incorrect username or password (even though you can log into the Cognito website correctly using the same), it may be because you have special characters in your password that need to be escaped with a backslash "\\" 

For example, PA$$word12 would need to be PA\\$\\$word12

**Step 4a & 4b - Unit and Integration testing**

Be careful when copying in the contents of the scripts relating to the unit and integration tests.

The placeholder files have text in them already, if this text isn't overwritten it can cause syntax problems when you try to run them.

**Please complete the survey prior to departure**

We use this information to inform future events, let us know what you'd like to see more of!

<img src="https://hackmd.io/_uploads/rJsnFZ852.png"  width="300" height="300">

## Useful resources

**ServerlessLand**

This site brings together the latest information, blogs, videos, code, and learning resources for AWS Serverless. Learn to use and build apps that scale automatically on low-cost, fully-managed serverless architecture.

https://serverlessland.com/

**Well-Architected for Serverless Applications**

https://aws.amazon.com/blogs/compute/building-well-architected-serverless-applications-introduction/

**Serverless Learning Plan & Serverless Digital Badge**

https://explore.skillbuilder.aws/learn/learning_plan/view/92/serverless-learning-plan-earn-a-learning-badge

**Lambda Powertools**

https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-lambda-powertools/

**Resources for unit and integration tests for serverless applications**
* https://aws.amazon.com/blogs/compute/getting-started-with-testing-serverless-applications/
* https://serverlessland.com/testing/patterns


**Building Event-driven Architectures on AWS Workshop**

In this workshop you’ll learn the basics of event-driven design, how to choose the right AWS service for the job, as well as how to optimize for both cost and performance. Through hands on practice, this workshop will give you the skills to bring event-driven design patterns into your own applications.

https://catalog.us-east-1.prod.workshops.aws/workshops/63320e83-6abc-493d-83d8-f822584fb3cb/en-US/

**Choosing between REST APIs and HTTP APIs**
REST APIs and HTTP APIs are both RESTful API products. REST APIs support more features than HTTP APIs, while HTTP APIs are designed with minimal features so that they can be offered at a lower price. Choose REST APIs if you need features such as API keys, per-client throttling, request validation, AWS WAF integration, or private API endpoints. Choose HTTP APIs if you don't need the features included with REST APIs.

The following article summarize core features that are available in REST APIs and HTTP APIs.

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html



