Club Leavers/Joiners Infrastructure

The Infrastructure page lists and explains the Infra components which are required for the code to run properly.

Components

Component

Description

Activity

Ref

<<SSM Attributee>>

New SSM key specifically for Club Leavers/Handlers to protect the content

New

SSM Key

<<Config Service>>

New application configuration for Club Leavers/Handlers

New

Configuration(from config service)

<<AWS Role>>

New AWS Role to CW log filter to work

New

AWS Role

<<AWS Step Function>>

New Step Function for Club Leavers/Handlers

New

AWS Step Function

<<AWS Lambda>>

New Lambdas to handle tasks related to Club Leavers/Handlers

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.

storepick_club_apikey

values

{
    "API_KEY": "...",
    "AUTHORISATION": "..."
}

Configuration(from config service)

Attribute

Description

storepick-nhs-discount.json

NHS Discount application configuration

{
    "MORI_BASE_URL": "https://api.morrisons.com",
    "OSP_BASE_URL": "https://api.mol.osp.tech/externalapi",
    "OSP_CUSTOMER_GROUPS_URL": "v3/morrisons/customer-groups/",
    "OSP_CUSTOMER_URL": "v3/customers",
    "BIG_QUERY_DATASET": "store_pick_discount",
    "BIG_QUERY_TABLE": "nhs_discount",
    "SF_PASS_DATA_S3_BUCKET_AND_DIR": 'mprd.hmdel.digital.strpck.sokczaiifq/nhsdiscount',
    "CONCURRENCY_CHUNK_SIZE" : 1000,
    "CLUBEVENTS_URL": "club/v1/events",
    "step_functions_arn_template": "arn:aws:states:eu-west-1:333073960552:stateMachine:stf-euw1-$ENV-stm-storepick_nhs_discount_workflow",
    "dynamodb_table_template": "$ENV.xxwmm.storepick.watermarks",
    "service_name": "clubevents",
    "group_mapping": [
        {
            "club_id": "5",
            "club_name": "NHS",
            "group_id": "example"
        },
        {
            "club_id": "6",
            "club_name": "Colleague",
            "group_id": "example"
        },
        {
            "club_id": "7",
            "club_name": "Additional members",
            "group_id": "example"
        }
    ],
    "IS_SERVICE_ENABLED": "yes",
    "COLLEAGUE_DISCOUNT_ENABLED": "yes",
    "MAX_NUMBER_OF_EVENTS": 1500,
    "MAX_NUMBER_OF_EVENTS_IN_ONE_CHUNK": 100,
    "SECONDS_TO_WAIT_FOR_CHUNK_PROCESSING": 5
}

AWS Role

Role Name

rol-glob-n-digital-lambda-001

AWS Step Function

Environment

Aws Step Function

dev

stf-euw1-dev-stm-storepick_nhs_discount_workflow

sit

stf-euw1-sit-stm-storepick_nhs_discount_workflow

uat

stf-euw1-uat-stm-storepick_nhs_discount_workflow

prd

stf-euw1-prd-stm-storepick_nhs_discount_workflow

AWS Lambda

Generate Input

Environment

Aws Lambda

dev

lmb-euw1-dev-strpck-nhsdiscount_generate_input-001

sit

lmb-euw1-sit-strpck-nhsdiscount_generate_input-001

uat

lmb-euw1-uat-strpck-nhsdiscount_generate_input-001

prd

lmb-euw1-prd-strpck-nhsdiscount_generate_input-001

Add customers to group

Environment

Aws Lambda

dev

lmb-euw1-dev-strpck-osp_add_customers_to_group_nhs-001

sit

lmb-euw1-sit-strpck-osp_add_customers_to_group_nhs-001

uat

lmb-euw1-uat-strpck-osp_add_customers_to_group_nhs-001

prd

lmb-euw1-prd-strpck-osp_add_customers_to_group_nhs-001

Remove customers from group

Environment

Aws Lambda

dev

lmb-euw1-dev-strpck-osp_remove_customers_from_group-001

sit

lmb-euw1-sit-strpck-osp_remove_customers_from_group-001

uat

lmb-euw1-uat-strpck-osp_remove_customers_from_group-001

prd

lmb-euw1-prd-strpck-osp_remove_customers_from_group-001

Generate Output

Environment

Aws Lambda

dev

lmb-euw1-dev-strpck-nhsdiscount_generate_output-001

sit

lmb-euw1-sit-strpck-nhsdiscount_generate_output-001

uat

lmb-euw1-uat-strpck-nhsdiscount_generate_output-001

prd

lmb-euw1-prd-strpck-nhsdiscount_generate_output-001

Club Leavers Joiners

Environment

Aws Lambda

dev

lmb-euw1-dev-strpck-club_leavers_joiners-001

sit

lmb-euw1-sit-strpck-club_leavers_joiners-001

uat

lmb-euw1-uat-strpck-club_leavers_joiners-001

prd

lmb-euw1-prd-strpck-club_leavers_joiners-001