From 6a95a095ac420859280bbf6ea6f73c0eb63cd6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Fran=C3=A7ois?= Date: Tue, 16 Apr 2024 17:29:14 +0200 Subject: [PATCH] docs(aws): fix typo and upgrade cleanup flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Federico François --- docs/tutorials/aws.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/aws.md b/docs/tutorials/aws.md index bfabc6fa67..54eafba5f4 100644 --- a/docs/tutorials/aws.md +++ b/docs/tutorials/aws.md @@ -211,10 +211,12 @@ aws iam attach-user-policy --user-name "externaldns" --policy-arn $POLICY_ARN ```bash SECRET_ACCESS_KEY=$(aws iam create-access-key --user-name "externaldns") -cat <<-EOF > /local/path/to/credentials +ACCESS_KEY_ID=$(echo $SECRET_ACCESS_KEY | jq -r '.AccessKey.AccessKeyId') + +cat <<-EOF > credentials [default] -aws_access_key_id = $(echo $SECRET_ACCESS_KEY | jq -r '.AccessKey.AccessKeyId') +aws_access_key_id = $(echo $ACCESS_KEY_ID) aws_secret_access_key = $(echo $SECRET_ACCESS_KEY | jq -r '.AccessKey.SecretAccessKey') EOF ``` @@ -910,13 +912,17 @@ eksctl delete cluster --name $EKS_CLUSTER_NAME --region $EKS_CLUSTER_REGION Give ExternalDNS some time to clean up the DNS records for you. Then delete the hosted zone if you created one for the testing purpose. ```bash -aws route53 delete-hosted-zone --id $NODE_ID # e.g /hostedzone/ZEWFWZ4R16P7IB +aws route53 delete-hosted-zone --id $ZONE_ID # e.g /hostedzone/ZEWFWZ4R16P7IB ``` If IAM user credentials were used, you can remove the user with: ```bash aws iam detach-user-policy --user-name "externaldns" --policy-arn $POLICY_ARN + +# If static credentials were used +aws iam delete-access-key --user-name "externaldns" --access-key-id $ACCESS_KEY_ID + aws iam delete-user --user-name "externaldns" ```