GET /characters
: Get characters from SWAPI api, accepts queryStrings: search and page.
GET /characters/:id
: Get a single character from SWAPI api.
GET /charactersdb
: Retrieve list of characters from DynamoDB.
POST /characters
: Create a character in DynamoDB.
plugins:
- serverless-auto-swagger
- serverless-offline
- serverless-esbuild
- serverless-stage-manager
- serverless-deployment-bucket
To install all dependencies, run the following command:
npm install
To test your service without deploying, you can use the command:
npm run dev
NOTE: DynamoDB Local is not yet implemented, so you can only try all lambda functions that do not require Dynamo.
To deploy your service, you can use the following command:
npm run deploy
# or
serverless deploy
# or
serverless deploy --stage develop --aws-profile profile1
NOTE: Do not forget to configure your AWS credentials before deploying.
NOTE: The tests will run automatically during deployment.
NOTE: Once the deployment is completed, in addition to the endpoints of the lambda functions, you will also obtain the endpoint of the Swagger UI.
NOTE: It's possible that the UI may take a little longer to become available after being deployed. Please take this into consideration if you encounter a
Missing Authentication Token
message.
If you want to remove your service, run the following command:
npm run remove