VishaalY/solutions-architect-hf-dataset huggingface dataset:
Question: Why is my Amazon S3 bucket returning a list of objects instead of the website's index page?

I'm using an Amazon Simple Storage Service (Amazon S3) bucket to host my static website. Why is the bucket returning a list of objects instead of the website's index page?Short descriptionIf you send a GET request to the bucket, then send the request to the website endpoint so that Amazon S3 returns the index page. Otherwise, Amazon S3 returns a list of objects in the bucket if you have permissions to the ListBucket API call.If you use an Amazon CloudFront distribution with an Amazon S3 origin, then you must also set the index page as the default root object.

ResolutionFollow these steps to find your bucket's website endpoint:Open the Amazon S3 console.From the bucket list, choose the bucket that you're using to host the static website.Choose the Properties view, and then choose Static website hosting. The website endpoint is the value that's listed as Endpoint.If you're using CloudFront distribution with an Amazon S3 origin, then follow these steps to set your distribution's default root object to the index page:Open the CloudFront console.From the distribution list, choose the distribution that's associated with your S3 bucket.From the General view, choose Edit.For Default Root Object, enter the object name of your index page. For example, "index.html".Choose Yes, Edit.Note: Endpoints vary by AWS region. For website endpoints by region, see Amazon S3 website endpoints. For REST API endpoints by region, see Amazon S3 endpoints.

Related informationKey differences between the Amazon website and the REST API endpoint
Question: I accidentally deleted my Amazon RDS for MySQL instance

What do I do if I accidentally delete my Amazon Relational Database Service (Amazon RDS) for MySQL instance? How can I prevent this from happening again?ResolutionIf you've accidentally deleted your Amazon RDS for MySQL instance, you can use an earlier snapshot of the DB instance to restore the instance.To restore a DB instance from a snapshot in Amazon RDS, perform the following steps:1.    Open the Amazon RDS console.2.    In the navigation pane, choose Snapshots.3.    Choose the DB snapshot that you want to restore from.4.    For Actions, choose Restore snapshot.5.    On the Restore snapshot page, for DB instance identifier, enter the name of your restored DB instance.6.    Choose Restore DB instance.Additionally, consider the following best practices to prevent any future incidents where your instance is accidentally deleted:Enable delete protection. When a DB instance or cluster is configured with deletion protection, the database can't be deleted by any user.Enable cross-Region replication for automated backups. Automated backups that are replicated to another AWS Region are retained even if you choose not to retain automated backups.Note: Backup replication is available for Amazon RDS DB instances that are running the following database engines: Oracle Database version 12.1.0.2.v10 and higher, PostgreSQL version 9.6 and higher and unencrypted Microsoft SQL Server version 2012 and higher.Automate manual snapshots of the Amazon RDS instance.Create a final snapshot and retain any automated backups.

Related informationImplementing a disaster recovery strategy with Amazon RDS
Question: What do I do if I'm having trouble signing in to or accessing my AWS account?

I can't sign in to my AWS account, or access the resources or information that I need.

Short descriptionIssues accessing AWS accounts or their resources usually fall under one of these categories:A browser issue prevents you from signing in.You can't sign in to an AWS account because you're using incorrect credentials (email address, username, or password). Or, you forgot the credentials that you use to sign in to an AWS account.You received a notification that there is an issue with your AWS account (for example, that it's closed or suspended).You turned on a multi-factor authentication device (MFA) for your account, but the device is lost, broken, or doesn't work.

ResolutionResolving issues with your browserIf your browser prevents you from logging in, then clear your browser's cache and cookies, or use a different browser.Resolving issues signing in with AWS credentialsTo sign in to the AWS account as the root user, you must use the email address and password associated with the account. To sign in to an AWS account as an AWS Identity and Access Management (IAM) user, use the credentials that your account administrator provided.If you can sign in but you can't access part of the console, then your account administrator might have restricted your permissions. To resolve this, contact your account administrator. Usually, the administrator is the person who gives you sign in credentials, or is the owner of your organization's management account.To reset the password for the root user or an IAM user, see How do I recover a lost or forgotten AWS password?Use the troubleshooting tips at I can't sign in because my credentials don't work in any of the following situations:You forgot the email address associated with your AWS account.The email address that you're using to sign in isn't working.Resolving issues with your accountIf your account is closed for more than 90 days, then your sign-in information no longer exists. To use AWS services, create a new AWS account with a different email address than the email address that's associated with your closed AWS account.To reactivate a suspended account, see How can I reactivate my suspended AWS account?To reopen an AWS account closed for less than 90 days, see Can I reopen my closed AWS account?Removing lost or broken MFA devices from an AWS accountSee How do I remove a lost or broken MFA device from my AWS account?Receiving account supportIf the previous methods don't work and you still can't access your account, then contact AWS Support with the Amazon Web Services Support form.

Related informationHow do I troubleshoot Amazon Elastic Compute Cloud (Amazon EC2) instance connection timeout errors from the internet?Sign in to the AWS Management Console as an IAM userYour AWS account ID and its alias
Question: Why is my EC2 Windows instance down with a system status check failure or status check 0/2?

My Amazon Elastic Compute Cloud (Amazon EC2) Windows instance went down suddenly and is no longer reachable. One or both system status checks failed. What happened and how can I fix this?Short descriptionAmazon Web Services (AWS) monitors the health of each EC2 instance with two status checks. An EC2 instance becomes unreachable if a status check fails.A system status check failure indicates a problem with the AWS systems that your instance runs on. When a problem with an underlying host impacts your production, you can stop and start your instance to migrate from the current underlying host.

ResolutionEC2 resources are Region-specific. Check the AWS Service Health Dashboard for service interruptions within the AWS Region where your instance is located. Look for outages and status updates to confirm if the problem is on the AWS side.If there is no outage, then follow these steps:Warning: Before you stop an instance, be aware of the following:If you're not using an Elastic IP address, the public IP address is released when you stop the instance.If this instance has an instance store volume, any data on the volume is lost when the instance is stopped.If the instance shutdown behavior is set to Terminate, the instance terminates when it's stopped.If the instance is part of an Auto Scaling group, first detach the instance from the Auto Scaling Group. After you stop and start the instance, attach the instance back to the Auto Scaling group.For more information, see Stop and start your instance and How do I reboot an instance in an Amazon EC2 Auto Scaling group?1.    Stop the instance.Note: If the instance becomes stuck in the stopping state, force the instance to stop using the Amazon EC2 console or the AWS Command Line Interface (AWS CLI).This action can take up to 10 minutes. For more information, see Troubleshoot stopping your instance.If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.2.    Start the instance. In most cases, the instance starts on a new, healthy underlying host server.Note: You can configure automatic recovery for EC2 Windows instances. For more information, see the following:How can I set up a CloudWatch alarm to automatically recover my EC2 instance?Related informationTroubleshoot an unreachable instanceTroubleshoot connecting to your Windows instanceWhy is my EC2 Windows instance down with an instance status check failure?Why is my EC2 Linux instance unreachable and failing one or both of its status checks?
Question: How do I troubleshoot AccessDenied errors on Amazon SQS API calls?

When I run an Amazon Simple Queue Service (Amazon SQS) API call, I receive an AccessDenied error similar to one of the following:“An error occurred (AccessDenied) when calling the SendMessage operation: Access to the resource https://sqs.us-east-1.amazonaws.com/ is denied.”“An error occurred (KMS.AccessDeniedException) when calling the SendMessage operation: User: arn:aws:iam::xxxxx:user/xxxx is not authorized to perform: kms:GenerateDataKey on resource: arn:aws:kms:us-east-1:xxxx:key/xxxx with an explicit deny”How can I troubleshoot this issue?ResolutionAmazon SQS access policy and IAM policyNote: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.Either the SQS access policy or the AWS Identity and Access Management (IAM) policy must include permissions to explicitly allow access for the action.If the SQS queue is in a different account, both the SQS access policy and the IAM policy must explicitly allow access. Important: An explicit deny in either policy overrides an explicit allow.If the policy uses a condition element, verify whether the condition restricts access.If the user or role is in an AWS Organizations organization that uses a service control policy (SCP), verify that the SCP isn't blocking the user or role.To confirm the IAM identity that is used to make API calls, run the following get-caller-identity AWS CLI command:aws sts get-caller-identityFor more information about Amazon SQS access permissions, see What permissions do I need to access an Amazon SQS queue?KMS permissionsIf your Amazon SQS queue has server-side encryption (SSE) turned on, permissions must be granted to both producers and consumers. The required permissions can be provided by an AWS managed AWS KMS key or by a customer managed key. A customer managed key policy must include access permissions for each queue producer and consumer. Or, you can update the IAM policy to include the required KMS permissions for the KMS key.Required producer permissions: kms:GenerateDataKey and kms:DecryptRequired consumer permissions: kms:DecryptTo access an SSE Amazon SQS queue from a different account, the queue must use a customer managed key. You can’t use an AWS managed key because only customer managed key policies can be modified. The KMS key policy must allow cross account access of the KMS key, and the IAM policy must include permissions to access the KMS key.For more information, see Key management.VPC endpoint policyIf you access SQS through an Amazon Virtual Private Cloud (Amazon VPC) endpoint, the SQS VPC endpoint policy must allow access.The following example VPC endpoint policy specifies that the IAM user MyUser is allowed to send messages to the SQS queue MyQueue. Other actions, IAM users, and SQS resources are denied access through the VPC endpoint.{   "Statement": [{      "Action": ["sqs:SendMessage"],      "Effect": "Allow",      "Resource": "arn:aws:sqs:us-east-2:123456789012:MyQueue",      "Principal": {        "AWS": "arn:aws:iam:123456789012:user/MyUser"      }   }]}
Question: How can I resolve the domain name with the ".local" suffix for a Route 53 private hosted zone?

I can't resolve an Amazon Route 53 private hosted zone record with my Elastic Compute Cloud (Amazon EC2) instance.

Short descriptionLinux OS distributions that use the systemd-resolved service handle DNS queries using a stub resolver. The stub resolver IP is located in /etc/resolv.conf. The local DNS stub listener doesn't forward DNS requests for domain names with the ".local" suffix. The DNS request fails with the response code "ServFail" similar to the following output:### failed ###ubuntu@ip-172-31-2-3:~$ dig example.local.; <<>> DiG 9.18.1-1ubuntu1.1-Ubuntu <<>> example.local.;; global options: +cmd;; Got answer:;; WARNING: .local is reserved for Multicast DNS;; You are currently testing what happens when an mDNS query is leaked to DNS;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 29563    ### status: SERVFAIL ###;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 65494;; QUESTION SECTION:;example.local.            IN    A;; Query time: 0 msec;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)            ### 127.0.0.53 is systemd-resolved ###;; WHEN: Thu Jun 30 12:34:56 UTC 2022;; MSG SIZE  rcvd: 42### success ###ubuntu@ip-172-31-2-3:~$ dig example.local. @172.31.0.2        ### dig to @172.31.0.2 AmazonProvidedDNS / Route 53 Resolver ###; <<>> DiG 9.18.1-1ubuntu1.1-Ubuntu <<>> example.local. @172.31.0.2;; global options: +cmd;; Got answer:;; WARNING: .local is reserved for Multicast DNS;; You are currently testing what happens when an mDNS query is leaked to DNS;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29352    ### status: NOERROR ###;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;example.local.            IN    A;; ANSWER SECTION:example.local.        300    IN    A    192.0.2.1;; Query time: 4 msec;; SERVER: 172.31.0.2#53(172.31.0.2) (UDP)            ### 172.31.0.2 is AmazonProvidedDNS / Route 53 Resolver ###;; WHEN: Thu Jun 30 12:34:56 UTC 2022;; MSG SIZE  rcvd: 58ResolutionTo resolve a domain name with the ".local" suffix, use the external resolver instead of the local DNS stub listener.Note: It's a best practice to avoid using the domain name ".local" suffix because RFC 6762 reserves this domain name for exclusive Multicast DNS use.1.    Change the DNS resolver from the local DNS stub listener to external DNS resolver (AmazonProvidedDNS).cd /etc/sudo ln -sf ../run/systemd/resolve/resolv.conf2.    Change .conf to stop the local DNS stub listener.cd /etc/systemd/sudo cp -ip resolved.conf resolved.conf.orgsudo sed -i -e 's/#DNSStubListener=yes/DNSStubListener=no/' resolved.conf3.    Restart systemd-resolved.sudo systemctl restart systemd-resolved

Related informationBest practices for Amazon Route 53 DNSHow can I troubleshoot DNS resolution issues with my Route 53 private hosted zone?
Question: How do I add multiple SSL certificates to the Application Load Balancer in my Elastic Beanstalk environment?

I want to add additional SSL certificates to the Application Load Balancer in my AWS Elastic Beanstalk environment.

Short descriptionThe Application Load Balancer supports multiple SSL certificates, but the SSLCertificateArns option setting in Elastic Beanstalk accepts only one certificate per listener.To add additional SSL certificates to your Application Load Balancer, you must create a resource-based .ebextension.

ResolutionAdd a second SSL certificate to your Application Load Balancer1.    Create a .ebextensions folder in the root directory of the source bundle.2.    In the .ebextensions folder, create a .config file based on the following:option_settings:  aws:elbv2:listener:443:    Protocol: HTTPS    SSLCertificateArns: "cert-arn-1"Resources:  AddingSSLCert2:    Type: "AWS::ElasticLoadBalancingV2::ListenerCertificate"    Properties:      ListenerArn:        Ref : "AWSEBV2LoadBalancerListener443"      Certificates:        - CertificateArn: "cert-arn-2"Note: In the preceding code example, replace cert-arn1 and cert-arn2 with your certificate's Amazon Resource Names (ARNs).To add additional certificates, add a new ListenerCertificate resource. For example:option_settings:  aws:elbv2:listener:443:    Protocol: HTTPS    SSLCertificateArns: "cert-arn-1"Resources:  AddingSSLCert2:    Type: "AWS::ElasticLoadBalancingV2::ListenerCertificate"    Properties:      ListenerArn:        Ref : "AWSEBV2LoadBalancerListener443"      Certificates:        - CertificateArn: "cert-arn-2"  AddingSSLCert3:    Type: "AWS::ElasticLoadBalancingV2::ListenerCertificate"    Properties:      ListenerArn:        Ref : "AWSEBV2LoadBalancerListener443"      Certificates:        - CertificateArn: "cert-arn-3"Note: In the preceding code example, replace cert-arn1, cert-arn-2, and cert-arn3 with your certificates ARNs.The option_settings section creates the HTTPS listener on port 443 and attaches a certificate to this listener. If you created the HTTPS listener from the console, then you can remove the option_settings section from the .config file. The Resources section creates another resource that attaches an additional certificate to the listener.3.    Apply the .ebextensions updates to your application bundle.4.    Deploy your application again.Your application updates the existing Application Load Balancer without replacing it.Important: The additional certificate doesn't appear in the Elastic Beanstalk console. To verify that your certificate is added to the Application Load Balancer, complete the steps in the Verify that your SSL certificates are added to the Application Load Balancer listener 443 section.Verify that your SSL certificates are added to the Application Load Balancer listener 4431.    Open the Amazon Elastic Compute Cloud (Amazon EC2) console.2.    From the navigation pane, choose Load Balancers.3.    Choose the Listeners tab.4.    For listener 443, choose View/edit certificates.You should see two certificates associated with listener 443.
Question: How do I check if my EC2 instance running Linux booted using UEFI or legacy BIOS?

How do I check if my Amazon Elastic Compute Cloud (Amazon EC2) instance running Linux booted using UEFI or legacy BIOS?Short descriptionUnified Extensible Firmware Interface (UEFI) is a firmware specification developed to replace the legacy BIOS firmware. The UEFI firmware runs special EFI binary files that have the .efi extension to load the boot loader or operating system. EC2 instances traditionally boot using the legacy BIOS mode. However, ARM-based EC2 instances (a1, c6g, m6g, and r6g) boot using the newer UEFI firmware.For more information on UEFI, see Unified Extensible Firmware Interface Forum on the uefi.org website.Resolution1.    Connect to your EC2 Linux instance using SSH.2.    Run the following command to verify the existence of the /sys/firmware/efi directory. This directory exists only if the instance boots using UEFI. The command returns Legacy BIOS Boot Detected if this directory doesn't exist.# [ -d /sys/firmware/efi ] && echo "UEFI Boot Detected" || echo "Legacy BIOS Boot Detected"Example output from an m6g instance:# [ -d /sys/firmware/efi ] && echo "UEFI Boot Detected" || echo "Legacy BIOS Boot Detected"UEFI Boot DetectedExample output from a non-ARM instance, for example, t2/t3/m4/m5 instances:# [ -d /sys/firmware/efi ] && echo "UEFI Boot Detected" || echo "Legacy BIOS Boot Detected"Legacy BIOS Boot Detected3.    Run the following command to verify that EFI appears in the dmesg output:# dmesg | grep -i "EFI"Example output:[    0.000000] efi: Getting EFI parameters from FDT:[    0.000000] efi: EFI v2.70 by EDK II
Question: How do I create a Lightsail load balancer with an SSL/TLS certificate to use with my Lightsail instances?

How do I create an Amazon Lightsail load balancer with an SSL/TLS certificate to use with my Lightsail instances?Short DescriptionA Lightsail load balancer enables better performance from your web applications by distributing inbound web traffic across your Lightsail instances in multiple Availability Zones. Attaching an SSL certificate to your Lightsail load balancer encrypts traffic between your browser and web server for an extra layer of security.

ResolutionCreate a Lightsail load balancer in the Lightsail console, and then attach instances to it.Create an SSL/TLS certificate for the Lightsail load balancer.Validate your domain ownership.Attach the validated SSL/TLS certificate to the Lightsail load balancer.Verify HTTPS access to the Lightsail load balancer. Open your browser and verify that there is a green padlock symbol next the website domain URL. The green padlock symbol confirms HTTPS access to your domain.Related InformationHow do I install an SSL certificate on a Bitnami stack hosted on Amazon Lightsail?SSL/TLS certificates in Lightsail
Question: What do I do when I receive my AWS Snowball Edge or Snowcone device?

I received my AWS Snowball Edge or AWS Snowcone device. I want to get started.Resolution1.    After you receive your Snowball Edge or Snowcone device, check the following:If the device has damage or apparent tampering, then don't connect to the device. Instead, open a case with AWS Support, and describe the issue so that you can be shipped a new device.If you received a Snowball Edge device, then confirm that you have the power cables. If you received a Snowcone device, then you don't get any accessories.2.    Turn on the device. Then, depending on your device, use one of the following tutorials to transfer data:How can I transfer my data to my AWS Snowball Edge device?Using NFS file shares to manage file storage3.    Depending on your device, follow these instructions to prepare the device for shipping back to AWS:For a Snowball Edge device, see Preparing an AWS Snowball Edge for shipping.For a Snowcone device, see Preparing an AWS Snowcone device for shipping.4.    Depending on your device, follow these instructions to ship the device back to AWS:For a Snowball Edge device, see Shipping an AWS Snowball Edge.For a Snowcone device, see Returning the Snowcone device.
Question: How do I increase my Lambda environment variable size quota?

I want to configure more than 4 KB of environment variables for my AWS Lambda function. How do I increase my service quota for Lambda environment variables?ResolutionLambda environment variables have a default 4 KB service quota that can't be increased.To configure more than 4 KB of environment variables for your Lambda function, you must use an external data store. For example, another database or either of the following AWS services:AWS Systems Manager Parameter StoreAmazon Simple Storage Service (Amazon S3)Note: Using either Parameter Store or Amazon S3 can incur charges on your AWS account. For pricing information, see AWS pricing. To review the Lambda service quotas, see the Service Quotas console.

Related informationViewing service quotasConfiguring functions in the consoleHow do I get a Lambda function in a VPC to access Systems Manager Parameter Store?