Colleague Discount Infrastructure

Components

Component

Description

Activity

Ref

<<SSM Attribute>>

New SSM key specifically for NHS Discount to protect the content

New

SSM Key

<<Config Service>>

New application configuration for NHS Discount

New

Configuration(from config service)

<<AWS Role>>

New AWS Role to CW log filter to work

New

AWS Role

<<AWS Lambda>>

New Lambda to handle each of the different endpoints

New

AWS Lambda

SSM Key

The security credentials will be stored in the following security credentials in the digital Jenkins. These credentials are used to populate the SSM key below in the respective environments. This secure attribute is created from the common-infrastructure repository.

SSM Parameter Name

storepick_discount_apikey

Value:

{
    "API_KEY": "my_api_key",
    "AUTHORISATION": "my_authorisation",
    "DECRYPTION_KEY": "example1234"
}

Configuration(from config service)

Config File Name

storepick-discount-api.json

Value:

{
    "KMS_KEY": "arn:aws:kms:eu-west-1:928369729144:alias/Storepick-restricted",
    "MORI_BASE_URL": "https://mocks.dev.spt.digital.morconnect.com/morri1",
    "CLUBUPDATECUSTOMERSOFCLUB_URL": "club/v1/customers",
    "CLUBCREATECUSTOMERSOFCLUB_URL": "club/v1/customers",
    "CLUBDELETECUSTOMERSOFCLUB_URL": "club/v1/customers",
    "ADDITIONAL_MEMBERS_LIMIT": 2
}

Attribute

Description

KMS_KEY

Relates to AWS Key Management Service, required for using encryption, in this case for the encrypted dynamodb database where customer details are stored

MORI_BASE_URL

The base url for the API endpoints used within the code. This is the base url for any Morrisons APIs so it is is the same for each.

CLUBUPDATECUSTOMERSOFCLUB_URL

The suffix url added onto the MORI_BASE_URL for ClubUpdateCustomersOfClub API. The attribute key name here is required in this format due to logic within this API class (this is why we require the same value to be repeated for each URL).

CLUBCREATECUSTOMERSOFCLUB_URL

The suffix url added onto the MORI_BASE_URL for ClubCreateCustomersOfClub API. The attribute key name here is required in this format due to logic within this API class (this is why we require the same value to be repeated for each URL).

CLUBDELETECUSTOMERSOFCLUB_URL

The suffix url added onto the MORI_BASE_URL for ClubDeleteCustomersOfClub API. The attribute key name here is required in this format due to logic within this API class (this is why we require the same value to be repeated for each URL).

ADDITIONAL_MEMBERS_LIMIT

The number (int) of additional members that should be the maximum allowed. E.g. if this value is set as 1, the PUT endpoint of the API will error and not complete the request if given 2 or more additional members in the payload.

AWS Role

Role Name

rol-glob-n-digital-restricted-lambda-001

AWS Lambda

Environment

Aws Lambda

dev

lmb-euw1-dev-storepick_discount_api-001

sit

lmb-euw1-sit-storepick_discount_api-001

uat

lmb-euw1-uat-storepick_discount_api-001

prd

lmb-euw1-dev-storepick_discount_api-001