Question : How can software determine the public and private IP addresses of the Amazon EC instance that it is running on? 1. Query the local instance metadata. 2. Query the appropriate Amazon CloudWatch metric. 3. Access Mostly Uused Products by 50000+ Subscribers 4. Use ipconfig or ifconfig command.
Explanation: Because your instance metadata is available from your running instance, you do not need to use the Amazon EC2 console or the AWS CLI. This can be helpful when you're writing scripts to run from your instance. For example, you can access the local IP address of your instance from instance metadata to manage a connection to an external application.
To view all categories of instance metadata from within a running instance, use the following URI:
http://169.254.169.254/latest/meta-data/ Note that you are not billed for HTTP requests used to retrieve instance metadata and user data.
You can use a tool such as cURL, or if your instance supports it, the GET command; for example:
$ curl http://169.254.169.254/latest/meta-data/ $ GET http://169.254.169.254/latest/meta-data/ You can also download the Instance Metadata Query tool, which allows you to query the instance metadata without having to type out the full URI or category names:
http://aws.amazon.com/code/1825
All metadata is returned as text (content type text/plain). A request for a specific metadata resource returns the appropriate value, or a 404 - Not Found HTTP error code if the resource is not available.
A request for a general metadata resource (the URI ends with a /) returns a list of available resources, or a 404 - Not Found HTTP error code if there is no such resource. The list items are on separate lines, terminated by line feeds (ASCII 10). curl http://169.254.169.254/latest/meta-data/local-hostname ip-10-251-50-12.ec2.internal
Question : Which method can be used to prevent an IP address block from accessing public objects in an S bucket? 1. Create a bucket policy and apply it to the bucket 2. Create a NACL and attach it to the VPC of the bucket 3. Access Mostly Uused Products by 50000+ Subscribers 4. Modify the IAM policies of any users that would access the bucket
Explanation: S3 ACL cannot be used for IP addresses.
Question : Amazon EBS snapshots have which of the following two characteristics? Choose 2 answers A. EBS snapshots only save incremental changes from snapshot to snapshot B. EBS snapshots can be created in real-time without stopping an EC2 instance C. EBS snapshots can only be restored to an EBS volume of the same size or smaller D. EBS snapshots can only be restored and mounted to an instance in the same Availability Zone as the original EBS volume