I followed all the steps mentioned in the lab exercise for VPC Peering from 2 AZ - us-east-1 and us-east-2.
I am not sure about from where the SCP command is to be executed and i am not able to copy the .pem file. Please help
Which lab is this (link please)? There is more than one VPC peering lab.
Also note that us-east-1 and us-east-2 are regions not availability zones. This is an important distinction!
In your SCP command, you have provided 2 PEM files. The command requires exactly one PEM file, which needs to be the PEM file associated with the key pair for the machine you need to connect to.
Thanks for your reply, I understand it is a region and not a AZ from your reply. To answer your question–
I copied the below from the tutorial. Question – I understand I need to use the respective .pem file for connecting to specific instance, what is the reason that I need to copy it using the SCP command for connecting to the instance. Please help
using ec2-user-1.pem as the identity for ec2-user at 54.80.120.44
copy *.pem (i.e.both pem files) to ~/ on the target server.
Then when you do SSH to the first server, the PEM files will be there, but you cannot connect to the private IP of the other server until the VPC peering is completed.