How to delete the AWS Config, which has been created for Free Account?


Follow the following steps:



Logging into your EC2 with your key:

ssh -i "dev-aws.pem" ec2-user@ec2-35-156-49-132.eu-central-1.compute.amazonaws.com
The authenticity of host 'ec2-35-156-49-132.eu-central-1.compute.amazonaws.com (35.156.49.132)' can't be established.
ECDSA key fingerprint is SHA256:CwHbvno8Brr6krhCSgdKn+BTV9AfXJoStNnFZ+ve59k.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ec2-35-156-49-132.eu-central-1.compute.amazonaws.com,35.156.49.132' (ECDSA) to the list of known hosts.
Last login: Sat Nov 12 05:32:20 2016 from cpc67679-lutn10-2-0-cust165.9-3.cable.virginm.net
[ec2-user@ip-172-31-27-221 ~]$

Check for AWS CLI
[ec2-user@ip-172-31-27-221 ~]$ aws
-bash: aws: command not found

Switch with root access:
[ec2-user@ip-172-31-27-221 ~]$ sudo -i
[root@ip-172-31-27-221 ~]#

Install the awscli if not already
[root@ip-172-31-27-221 ~]# pip install awscli
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting awscli

  Downloading awscli-1.11.14-py2.py3-none-any.whl (1.0MB)
    100% |████████████████████████████████| 1.0MB 506kB/s
Collecting botocore==1.4.71 (from awscli)
  Downloading botocore-1.4.71-py2.py3-none-any.whl (2.8MB)
    100% |████████████████████████████████| 2.8MB 175kB/s
Collecting s3transfer<0.2.0,>=0.1.9 (from awscli)
  Downloading s3transfer-0.1.9-py2.py3-none-any.whl (53kB)
    100% |████████████████████████████████| 57kB 7.2MB/s
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
  Downloading rsa-3.4.2-py2.py3-none-any.whl (46kB)
    100% |████████████████████████████████| 49kB 6.0MB/s
Collecting colorama<=0.3.7,>=0.2.5 (from awscli)
  Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting docutils>=0.10 (from awscli)
  Downloading docutils-0.12.tar.gz (1.6MB)
    100% |████████████████████████████████| 1.6MB 303kB/s
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.4.71->awscli)
  Downloading jmespath-0.9.0-py2.py3-none-any.whl
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.4.71->awscli)
  Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 196kB 2.3MB/s
Collecting futures<4.0.0,>=2.2.0 (from s3transfer<0.2.0,>=0.1.9->awscli)
  Downloading futures-3.0.5-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.3 in /usr/lib/python2.7/site-packages (from rsa<=3.5.0,>=3.1.2->awscli)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/lib/python2.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.
4.71->awscli)
Installing collected packages: jmespath, python-dateutil, docutils, botocore, futures, s3transfer, rsa, colorama, awscli
  Found existing installation: python-dateutil 1.5
    Uninstalling python-dateutil-1.5:
      Successfully uninstalled python-dateutil-1.5
  Running setup.py install for docutils
Successfully installed awscli-1.11.14 botocore-1.4.71 colorama-0.3.7 docutils-0.12 futures-3.0.5 jmespath-0.9.0 python-dateutil-2.6.0 rsa-3.4.2 s3tran
sfer-0.1.9
[root@ip-172-31-27-221 ~]#

Verify the awscli installation
[root@ip-172-31-27-221 ~]# aws
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: too few arguments
[root@ip-172-31-27-221 ~]#

Generate the key from IAM inside AWS

Do the aws configure
[root@ip-172-31-27-221 ~]# aws configure
AWS Access Key ID [None]: AKIAJWOQK364WS5BLOSQ
AWS Secret Access Key [None]: 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
Default region name [eu-central-1]:
Default output format [None]:

And finally delete the configuration recorder name:
[root@ip-172-31-27-221 ~]# aws configservice delete-configuration-recorder --configuration-recorder-name default

Or

[root@ip-172-31-27-221 ~]# aws configservice delete-configuration-recorder --configuration-recorder-name WhateverNameYouHaveEnter

Delete the S3 bucket as well, from S3 AWS.

Alternatively it will cost for it.



Happy learning and implementation!!

3 comments:

  1. Thanks, I follow the steps and was not working, then I stop recording manually and then it's work. you can add below command before executing what you have mentioned:

    aws configservice stop-configuration-recorder --configuration-recorder-name default

    And finally delete the configuration recorder name:
    [root@ip-172-31-27-221 ~]# aws configservice delete-configuration-recorder --configuration-recorder-name default

    Or

    [root@ip-172-31-27-221 ~]# aws configservice delete-configuration-recorder --configuration-recorder-name WhateverNameYouHaveEnter

    ReplyDelete
    Replies
    1. Free Python Programming Free for first 100 students
      https://www.udemy.com/course/core-python-programming-by-examples/?couponCode=FREEAPR2022

      Free Apache Maven for Beginners
      https://www.udemy.com/course/apache-maven-for-beginners/?referralCode=B6DAF84DEE7F9F4201FC

      Free Git (Bitbucket) in Unix or Windows
      https://www.udemy.com/course/git-bitbucket-in-unix-or-windows/?couponCode=FREEFOR1000IN5DAY

      Free Packer (Product of HashiCorp) Images from Scratch in OCI
      https://www.udemy.com/course/packer-product-of-hashicorp-custom-images-creation-from-scratch-in-oci/?couponCode=EFFD615E33FA3D53E7AA

      Python 3.x Programming Full Course In Just 360
      https://www.udemy.com/course/core-python-programming-by-examples/?couponCode=APR2022360ONLY

      Docker + Security + AWS Basics + Jenkins
      https://www.udemy.com/course/docker-security-aws-basics-jenkins/?couponCode=APR2022360ONLY

      Jenkins (Mastering in Jenkins with other Tools)
      https://www.udemy.com/course/jenkins-mastering-in-jenkins-with-other-tools/?couponCode=APR2022360ONLY

      Packer, Terraform, Jenkins and Vagrant in AWS Cloud (5-In-1)
      https://www.udemy.com/course/packer-terraform-jenkins-and-vagrant-in-aws-cloud-5-in-1/?couponCode=APR2022360ONLY

      Packer from Scratch in AWS
      https://www.udemy.com/course/packer-from-scratch-in-aws/?couponCode=APR2022360ONLY

      Terraform for AWS by Examples
      https://www.udemy.com/course/terraform-for-aws-by-examples/?couponCode=APR2022360ONLY

      Ansible Hands On in On-Premises & AWS Cloud Environments
      https://www.udemy.com/course/ansible-hands-on-in-on-premises-or-aws-cloud-environments/?couponCode=APR2022360ONLY

      Delete
  2. Nice post, keep posting and for Ansible end to end video watch: https://youtu.be/fJYFKYHP-Qk

    ReplyDelete