| Bookmark Name | Actions |
|---|
Reference
This section covers various scripts executed for configurations in a AWS region.
Environment Parameters
After you run install-aws.sh, the below environmental parameters are set in the environment.
- DATABASE_KEY=dynamodb
- temn_msf_security_authz_enabled=false
- className_getEntitlements=com.temenos.microservice.entitlement.function.EntitlementFunctions
Database configuration managed in install-aws.sh
Table Creation Expand source
aws dynamodb create-table --table-name <value> --attribute-definitions <value> --key-schema <value> --provisioned-throughput <value> Example: aws dynamodb create-table --table-name ms_entitlements_entitlement --attribute-definitions AttributeName=userId,AttributeType=S --key-schema AttributeName=userId,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=1
The below database tables are created in the dynamodb configured.
|
Table-Name |
Attribute-Name |
Key-Type |
|---|---|---|
|
ms_entitlements_entitlement |
userId |
HASH |
Lambda Functions created using install-aws.sh
You can create Lambda function using the below script.
aws lambda create-function --function-name <value> --runtime <value> --role <value> --handler <value> --description <value> --timeout <value> --memory-size <value> --publish --tags <value> --zip-file <value> --environment <value>
Example:
aws lambda create-function --function-name entitlements-entitlement --runtime java8 --role arn:aws:iam::177642146375:role/lambda_basic_execution --handler com.temenos.microservice.entitlement.function.GetEntitlementsFunctionAWS::invoke --description "Accounts API of Entitlements Service" --timeout 120 --memory-size 192 --publish --tags FunctionType=API,Service=Entitlements --zip-file fileb://app/$serviceFileName --environment Variables=\{DATABASE_KEY=dynamodb,temn_msf_security_authz_enabled=false,className_getEntitlements=com.temenos.microservice.entitlement.function.EntitlementFunctions\}
The available API Lambda functions are listed below.
|
Description |
Lambda-Functions |
|---|---|
|
Function for Accounts API of Entitlements Service |
entitlements-entitlement |
The available Ingester Lambda functions are listed below.
|
Description |
Lambda-Functions |
|---|---|
|
Function for Ingester for Entitlements Service |
entitlements-ingester |
API Gateway Creation
You can create API Gateway using the install-aws.sh script.
aws apigateway create-rest-api --name <value> --description <value> Example: aws apigateway create-rest-api --name ms-entitlements-api --description "Entitlements API"
aws apigateway get-resources --rest-api-id <value> Example: aws apigateway get-resources --rest-api-id nq6d0358ec
aws apigateway create-resource --rest-api-id <value> --parent-id <value> --path-part <value> Example: aws apigateway create-resource --rest-api-id nq6d0358ec --parent-id v54ede --path-part "entitlements"
aws apigateway put-method --rest-api-id <value> --resource-id <value> --http-method <value> --authorization-type <value> --api-key-required --region <value> aws apigateway put-integration --rest-api-id <value> --resource-id <value> --http-method value --type <value> --uri <value> --credentials <value> --integration-http-method <value> --content-handling <value> Example: aws apigateway put-method --rest-api-id "$restAPIId" --resource-id "$entitlementsResourceId" --http-method GET --authorization-type NONE --api-key-required --region eu-west-2 --request-parameters "method.request.path.externalUserId=true" aws apigateway put-integration --rest-api-id "$restAPIId" --resource-id "$entitlementsResourceId" --http-method GET --type AWS_PROXY --uri arn:aws:apigateway:eu-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-2:177642146375:function:entitlements-entitlement/invocations --credentials arn:aws:iam::177642146375:role/apigatewayrole --integration-http-method POST --content-handling CONVERT_TO_TEXT
The available APIs are listed below.
|
API |
Description |
|---|---|
|
/v1.0.0/party/customers/externalUserIds/{externalUserId}/entitlements |
To fetch the account details from a particular user-ID |
Add Bookmark
save your best linksView Bookmarks
Visit your best linksIn this topic
Are you sure you want to log-off?