To use an ACM certificate with Amazon CloudFront, the certificate must be created in the US East (N. Virginia) region, also known as us-east-1. CloudFront is a global service, and it requires that the certificates be in us-east-1 to be used. Therefore, creating the certificate in the eu-west-1 region will not work for a CloudFront distribution. The correct action is to ensure the ACM certificate is created in the us-east-1 region, which is not addressed directly by any of the given options.
To authenticate users logging in with their social media accounts when the application runs behind an Application Load Balancer (ALB) and uses CloudFront, you should configure the ALB to use Amazon Cognito as one of the authentication providers. Amazon Cognito supports social identity providers like Google, Facebook, and Amazon, which allows easy integration and authentication without additional custom code. This configuration is directly supported by the ALB and simplifies the integration of social media logins for your application.
To determine whether an application is running on a GPU instance, the function should retrieve the instance type from the instance metadata. Instance metadata provides information about an instance that can be used to make decisions based on the instance's characteristics, including whether it has GPU capabilities.
The most operationally efficient solution to send a login activity notification by email every time a user logs in is to use an AWS Lambda function triggered by an Amazon Cognito post authentication Lambda trigger. This approach is efficient because it directly integrates with the authentication process of Amazon Cognito, ensuring that an email notification is sent immediately after a successful login without needing additional infrastructure or complex configurations involving other AWS services. This method effectively leverages the built-in capabilities of Cognito to meet the requirements.
To monitor error rates and anomalies of a CloudFront distribution with the shortest possible refresh interval, activating real-time logs on the CloudFront distribution and creating a stream in Amazon Kinesis Data Streams ensures immediate log delivery. Additionally, creating Amazon CloudWatch alarms based on expected values of selected CloudWatch metrics provides near-real-time anomaly and error detection, fitting the requirements for rapid refresh intervals.