Question : Company D is running their corporate website on Amazon S accessed from http//www.companyd.com. Their marketing team has published new web fonts to a separate S3 bucket accessed by the S3 endpoint https://s3-us-west-1.amazonaws.com/cdfonts. While testing the new web fonts, Company D recognized the web fonts are being blocked by the browser. What should Company D do to prevent the web fonts from being blocked by the browser? 1. Enable versioning on the cdfonts bucket for each web font 2. Create a policy on the cdfonts bucket to enable access to everyone 3. Access Mostly Uused Products by 50000+ Subscribers 4. Configure the cdfonts bucket to allow cross-origin requests by creating a CORS configuration
Explanation: Cross-origin resource sharing (CORS) defines a way for client web applications that are loaded in one domain to interact with resources in a different domain. With CORS support in Amazon S3, you can build rich client-side web applications with Amazon S3 and selectively allow cross-origin access to your Amazon S3 resources. The following are example scenarios for using CORS: " Example 1: Suppose you are hosting a website in an Amazon S3 bucket named website as described in Hosting a Static Website on Amazon S3. Your users load the website endpoint http://website.s3-website-us-east-1.amazonaws.com. Now you want to use JavaScript on the web pages that are stored in this bucket to be able to make authenticated GET and PUT requests against the same bucket by using the Amazon S3's API endpoint for the bucket, website.s3.amazonaws.com. A browser would normally block JavaScript from allowing those requests, but with CORS, you can configure your bucket to explicitly enable cross-origin requests from website.s3-website-us-east-1.amazonaws.com. Example 2: Suppose you want to host a web font from your S3 bucket. Again, browsers require a CORS check (also referred as a preflight check) for loading web fonts, so you would configure the bucket that is hosting the web font to allow any origin to make these requests.
Question : You have an environment that consists of a public subnet using Amazon VPC and instances that are running in this subnet. These three instances can successfully communicate with other hosts on the Internet. You launch a fourth instance in the same subnet, using the same AMI and security group configuration you used for the others, but find that this instance cannot be accessed from the Internet. What should you do to enable internet access? 1. Deploy a NAT instance into the public subnet. 2. Modify the routing table for the public subnet 3. Access Mostly Uused Products by 50000+ Subscribers 4. Assign an Elastic IP address to the fourth instance.
Explanation: By default, an instance in a nondefault VPC is not assigned a public IP address, and is private. You can make an instance in a nondefault VPC public by attaching an Internet gateway to the VPC and providing the instance with a public IP address. In this exercise, you created an Internet gateway for your VPC using the VPC wizard. You accepted the default settings in the launch wizard, so you did not receive a public IP address. Now, you'll create an Elastic IP address, which is a public IP address that belongs to your AWS account, and associate it with your instance to make it accessible from the Internet. An Elastic IP address is a static IP address designed for dynamic cloud computing. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. Your Elastic IP address is associated with your AWS account, not a particular instance, and it remains associated with your account until you choose to release it explicitly.
We assign each instance in a default VPC two IP addresses at launch: a private IP address and a public IP address that is mapped to the private IP address through network address translation (NAT). The public IP address is allocated from the EC2-VPC public IP address pool, and is associated with your instance, not with your AWS account. You cannot reuse a public IP address after it's been disassociated from your instance.
We assign each instance in a nondefault VPC only a private IP address, unless you specifically request a public IP address during launch, or you modify the subnet's public IP address attribute. To ensure that an instance in a nondefault VPC that has not been assigned a public IP address can communicate with the Internet, you must allocate an Elastic IP address for use with a VPC, and then associate that Elastic IP address with the elastic network interface (ENI) attached to the instance.
When you associate an Elastic IP address with an instance in a default VPC, or an instance in which you assigned a public IP to the eth0 network interface during launch, its current public IP address is released to the EC2-VPC public IP address pool. If you disassociate an Elastic IP address from the instance, the instance is automatically assigned a new public IP address within a few minutes. However, if you have attached a second network interface to the instance, the instance is not automatically assigned a new public IP address; you'll have to associate an Elastic IP address with it manually. The Elastic IP address remains associated with the instance when you stop it.
To ensure efficient use of Elastic IP addresss, we impose a small hourly charge if an Elastic IP address is not associated with a running instance, or if it is associated with a stopped instance or an unattached network interface. While your instance is running, you are not charged for one Elastic IP address associated with the instance, but you are charged for any additional Elastic IP addresss associated with the instance.
Question : Which of the following is chosen as the default region when making an API call with an AWS SDK? 1. ap-northeast-1 2. us-west-2 3. Access Mostly Uused Products by 50000+ Subscribers 4. eu-west-1 5. us-central-1
The AWS SDK for Java uses us-east-1 as the default region if you do not specify a region in your code. However, the AWS Management Console uses us-west-2 as its default. Therefore, when using the AWS Management Console in conjunction with your development, be sure to specify the same region in both your code and the console.
1. Each region has multiple, isolated locations known as Availability Zones. 2. Each Availability Zones has multiple, isolated locations known as region . 3. Each Availability Zones is a separate geographic area 4. 1 and 3 5. 2 and 3