Skip to content

Commit 693c6f5

Browse files
committed
Tidying make file and aws script
1 parent cf5003f commit 693c6f5

2 files changed

Lines changed: 1 addition & 25 deletions

File tree

Makefile

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,6 @@ config:: # Configure development environment (main) @Configuration
5353
#### Proxygen ####
5454
##################
5555

56-
# retrieve-proxygen-key: # Obtain the 'machine user' credentials from AWS SSM (Development environment)
57-
# mkdir -p ~/.proxygen && \
58-
# aws ssm get-parameter --name /proxygen/private_key_temp --with-decryption | jq ".Parameter.Value" --raw-output \
59-
# > ~/.proxygen/eligibility-signposting-api.pem
60-
61-
# retrieve-proxygen-key: # Obtain the 'machine user' credentials from AWS SSM (Development environment)
62-
# mkdir -p ~/.proxygen && \
63-
# aws ssm get-parameter --name /proxygen/private_key_temp_$(ENV) --with-decryption | jq ".Parameter.Value" --raw-output \
64-
# > ~/.proxygen/eligibility-signposting-api-$(ENV).pem
65-
#
66-
# retrieve-proxygen-key-ptl:
67-
# $(MAKE) retrieve-proxygen-key ENV=ptl
68-
#
69-
# retrieve-proxygen-key-prod:
70-
# $(MAKE) retrieve-proxygen-key ENV=prod
71-
7256
# Verify current AWS account login and retrieve the proxygen key
7357
# from AWS SSM for the specified environment
7458
retrieve-proxygen-key: guard-ENV

scripts/check-aws-account.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ case "$APIM_ENV_NAME" in
1616
;;
1717
prod)
1818
AWS_ENV_NAME="prod"
19-
EXPECTED_ACCOUNT="333333333333"
19+
EXPECTED_ACCOUNT="476114145616"
2020
;;
2121
*)
2222
echo "Unknown APIM environment: $APIM_ENV_NAME"
@@ -30,14 +30,6 @@ CURRENT_ACCOUNT=$(aws sts get-caller-identity --query "Account" --output text)
3030
# Compare the current account with the expected account
3131
if [ "$CURRENT_ACCOUNT" != "$EXPECTED_ACCOUNT" ]; then
3232
echo "AWS account mismatch!"
33-
# MSG="The 'ENV' arg '$APIM_ENV_NAME' for APIM maps to the AWS env '$AWS_ENV_NAME' and account $EXPECTED_ACCOUNT, but the current AWS account is $CURRENT_ACCOUNT."
34-
# echo "$MSG"
35-
# echo "The 'ENV' arg $APIM_ENV_NAME for APIM maps to the AWS env $AWS_ENV_NAME and account $EXPECTED_ACCOUNT, but the current AWS account is $CURRENT_ACCOUNT."
36-
# echo "APIM environment : $APIM_ENV_NAME"
37-
# echo "Expected AWS environment: $AWS_ENV_NAME"
38-
# echo "Expected account: $EXPECTED_ACCOUNT"
39-
# echo "Actual account : $CURRENT_ACCOUNT"
40-
# echo "The APIM '$APIM_ENV_NAME' environment is mapped to the AWS '$AWS_ENV_NAME' environment and account $EXPECTED_ACCOUNT, but the current AWS account is $CURRENT_ACCOUNT."
4133
echo "The expected mapping for the argument 'ENV=$APIM_ENV_NAME' is AWS '$AWS_ENV_NAME' account $EXPECTED_ACCOUNT, but the current AWS account is $CURRENT_ACCOUNT."
4234
echo "Please switch to the correct AWS account and try again."
4335
echo "Exiting script..."

0 commit comments

Comments
 (0)