Step 4: Clean up (Optional) - Amazon MemoryDB for Redis
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Step 4: Clean up (Optional)

To clean up, take these steps.

Step 4.1: Delete Lambda function

aws lambda delete-function \ --function-name AccessMemoryDB

Step 4.2: Delete MemoryDB cluster

Delete the cluster.

aws memorydb delete-cluster \ --cluster-name cluster-01

Remove user and ACL.

aws memorydb delete-user \ --user-id iam-user-01 aws memorydb delete-acl \ --acl-name iam-acl-01

Step 4.3: Remove IAM Role and policies

aws iam detach-role-policy \ --role-name "memorydb-iam-auth-app" \ --policy-arn "arn:aws:iam::123456789012:policy/memorydb-allow-all" aws iam detach-role-policy \ --role-name "memorydb-iam-auth-app" \ --policy-arn "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" aws iam delete-role \ --role-name "memorydb-iam-auth-app" aws iam delete-policy \ --policy-arn "arn:aws:iam::123456789012:policy/memorydb-allow-all"