In order to deploy the endpoint simply run
serverless deploy
The expected result should be similar to:
Serverless: Packaging service…
Serverless: Uploading CloudFormation file to S3…
Serverless: Uploading service .zip file to S3…
Serverless: Updating Stack…
Serverless: Checking Stack update progress…
Serverless: Stack update finished…
Service Information
service: serverless-XXXXX-stg
stage: stg
region: us-west-2
api keys:
None
endpoints:
POST - https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/
GET - https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/
GET - https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/{id}
PUT - https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/{id}
DELETE - https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/{id}
SEARCH - https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/search/Content
## Usage
You can create, retrieve, update, or delete Content with the following commands:
### Create a Content sample
```bash
curl -X POST https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content --data '{ "EthereumAddress": "sadgaskdkasjhksdjahasdasdkj", "EthereumRank": "123456", "recordStatus": true}'
Example Result:
{ "Success": true, "Data": [ { "EthereumAddress": "sadgaskdkasjhksdjahasdasdkj", "EthereumRank": "123456", "recordStatus": true, "Id": "5faf4650-be21-11e7-a340-f355bb709593", "createdAt": 1509443620661, "updatedAt": 1509443620661 } ] }%
curl https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content
Example output:
{ "Success": true, "Data": [ { "EthereumAddress": "sadgaskdkasjhksdjahasdasdkj", "EthereumRank": "123456", "recordStatus": true, "Id": "5faf4650-be21-11e7-a340-f355bb709593", "createdAt": 1509443620661, "updatedAt": 1509443620661 } ] }%
# Replace the <id> part with a real id from your Content table
curl https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/<id>
Example Result:
{ "Success": true, "Data": [ { "EthereumAddress": "sadgaskdkasjhksdjahasdasdkj", "EthereumRank": "123456", "recordStatus": true, "Id": "5faf4650-be21-11e7-a340-f355bb709593", "createdAt": 1509443620661, "updatedAt": 1509443620661 } ] }%
# Replace the <id> part with a real id from your Content table
curl -X PUT https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/<id> --data '{ "Success": true, "Data": [ { "EthereumAddress": "sadgaskdkasjhksdjahasdasdkj", "EthereumRank": "123456", "recordStatus": true, "Id": "5faf4650-be21-11e7-a340-f355bb709593", "createdAt": 1509443620661, "updatedAt": 1509443620661 } ] }'
Example Result:
{ "Success": true, "Data": [ { "EthereumAddress": "sadgaskdkasjhksdjahasdasdkj", "EthereumRank": "123456", "recordStatus": true, "Id": "5faf4650-be21-11e7-a340-f355bb709593", "createdAt": 1509443620661, "updatedAt": 1509443620661 } ] }%
# Replace the <id> part with a real id from your Content table
curl -X DELETE https://XXXXXXX.execute-api.us-west-2.amazonaws.com/stg/Content/<id>
No output
By default, AWS Lambda limits the total concurrent executions across all functions within a given region to 100. The default limit is a safety limit that protects you from costs due to potential runaway or recursive functions during initial development and testing. To increase this limit above the default, follow the steps in To request a limit increase for concurrent executions.
When you create a table, you specify how much provisioned throughput capacity you want to reserve for reads and writes. DynamoDB will reserve the necessary resources to meet your throughput needs while ensuring consistent, low-latency performance. You can change the provisioned throughput and increasing or decreasing capacity as needed.
This is can be done via settings in the serverless.yml
.
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1