-3

I want to write a bash script to delete the subdomain name in Route 53.

I have given access to my ec2 server by using

$ echo "[Credentials]" > ~/.boto
$ echo "AWS_ACCESS_KEY_ID=key" >> ~/.boto
$ echo "AWS_SECRET_ACCESS_KEY=secret" >> ~/.boto
$ chmod 640 ~/.boto

Now,I am using cli53 rrdelete subdomain_name CNAME command on my ubuntu server but got

"usage: cli53 rrdelete [-h] [-i IDENTIFIER] [--wait]
                      zone rr [{A,AAAA,CNAME,SOA,NS,MX,PTR,SPF,SRV,TXT,ALIAS}]
cli53 rrdelete: error: argument zone: Zone 'stagingmunnar1.bizom.in' not found"

error. So,Kindly let me know how to use this command to delete my subdomain in AWS Route 53.

HBruijn
  • 77,029
  • 24
  • 135
  • 201
  • You don't need to ask people to help you, within your question. But... as it stands, you really don't have a question - you have a statement about what you want to do. And you've shown no work, so it looks like you're asking people to write you a bash script. That's not really how ServerFault works. You should show what you've done, and where you're stuck. – David Makogon Jun 21 '16 at 18:48
  • After giving access to my EC2 server:- $ echo "[Credentials]" > ~/.boto $ echo "AWS_ACCESS_KEY_ID=key" >> ~/.boto $ echo "AWS_SECRET_ACCESS_KEY=secret" >> ~/.boto $ chmod 640 ~/.boto...I use the command "cli53 rrdelete subdomain_name CNAME" to delete the particular subdomain...but it produces "cli53 rrdelete: error: argument zone: Zone 'subdomain_name' not found" error... – Modassir Haider Jun 22 '16 at 08:06
  • 1
    Read the usage syntax again. There are two names that you need to supply before the record type. – Andrew B Jun 24 '16 at 18:20

1 Answers1

0

Typically *nix commands come with a manual page try man cli53 to see if that gives you more information than just that terse error/help message. Manual pages typically come with examples as well.

In this case I think if would know the jargon would understand what the error message is trying to tell was wrong in your command. The required options for cli53 rrdelete are:

  • zone = your domainname (i.e. bizom.in)
  • rr is a Resource Record or simply a (subdomain) entry in a DNS zone (either stagingmunnar1 or stagingmunnar1.bizom.in.)

By convention [optional arguments] are enclosed by brackets [] .

You probably did:

cli53 rrdelete stagingmunnar1.bizom.in CNAME

instead of:

cli53 rrdelete bizom.in stagingmunnar1 CNAME
HBruijn
  • 77,029
  • 24
  • 135
  • 201
  • I was passing the wrong credentials that why I was unable to run the command which were given by you.Thanks a lot for your help.God bless you – Modassir Haider Jun 27 '16 at 12:14