VishaalY/solutions-architect-hf-dataset huggingface dataset:
Question: Why is my Amazon RDS DB instance in a failed state?

My Amazon Relational Database Service (Amazon RDS) instance is in a failed state. What does this mean, and how do I fix it?ResolutionThe failed state for RDS DB instances usually indicates that the hardware associated with your RDS DB instance failed, and that AWS wasn’t able to recover it.If you previously configured a backup solution for your RDS DB instance, restore it from one of the following backups:An automatic or manual backup.Point-in-time recovery (PITR).Note: PITR is available only for RDS DB instances with automatic backups. To retain the same endpoint name for your RDS DB instance, perform a PITR of your instance using a different name before deleting the instance that is in the failed state.After recovering your instance by using your preferred backup solution, delete the failed instance.After the failed DB instance is deleted, you can optionally rename the newly restored DB instance using the old DB instance's endpoint name, which means you don't need to change the configuration of your application to connect to the new DB instance.When you restore a DB instance from a snapshot, the I/O latency might be high to start. As you access the data on the instance, the latency decreases.To help mitigate failures, consider running your RDS DB instances in a Multi-AZ deployment, and keep the best practices for Amazon RDS in mind when designing your architecture.

Related informationTroubleshooting for Amazon RDS
Question: How do I implement pagination in Amazon DynamoDB?

When I try to fetch items from an Amazon DynamoDB table using a Query or Scan operation, the response doesn't return the complete results.

ResolutionThis issue occurs under the following conditions:Your initial Scan or Query operation contains LastEvaluatedKey in the response.You didn't perform a subsequent operation using this key as ExclusiveStartKey for the next request.You can resolve this issue by implementing pagination for your DynamoDB table. Pagination is the process of sending subsequent requests to continue when a previous request is incomplete. A Query or Scan operation in DynamoDB might return results that are incomplete and require subsequent requests to attain the entire result set. This is because DynamoDB paginates the results from a Query or Scan operation and returns a maximum of 1MB of data in a single operation. This is a hard limit in DynamoDB. With pagination, the results from the Scan and Query operations are divided into pages of data that are 1 MB or less in size.To paginate your results and retrieve them one page at a time, check the low-level result from a Scan or Query operation to see if the result contains the LastEvaluatedKey element. You can get the remaining results of the initial request using another Scan or Query operation with the same parameters, but using the LastEvaluatedKey value as the ExclusiveStartKey parameter. If the result doesn't include the LastEvaluatedKey value, then there are no items to be retrieved.For more information, see Paginating table query results and Paginating the results.To implement pagination in Boto3 using LastEvaluatedKey, use the following code sample:from __future__ import print_function  # Python 2/3 compatibilityimport boto3from botocore.exceptions import ClientError# Create Clientsession = boto3.session.Session()dynamoDbClient = session.client('dynamodb')table_name = 'AmazonBins'# Track number of Items readitem_count = 0try:    # Get the first 1MB of data    response = dynamoDbClient.scan(        TableName=table_name    )except ClientError as error:    print("Something went wrong: ")    print(error.response['ResponseMetadata'])# Track number of Items readitem_count += len(response['Items'])# Paginate returning up to 1MB of data for each iterationwhile 'LastEvaluatedKey' in response:    try:        response = dynamoDbClient.scan(            TableName=table_name,            ExclusiveStartKey=response['LastEvaluatedKey']        )        # Track number of Items read        item_count += len(response['Items'])    except ClientError as error:        print("Something went wrong: ")        print(error.response['ResponseMetadata'])print("Total number of items found: {}".format(item_count))
Question: Can I schedule my Savings Plan to renew automatically?

I have a Savings Plan that expires soon. Can I schedule my Savings Plan to renew automatically?ResolutionYou can queue your Savings Plan purchases for a specific date and time in the future. To renew your Savings Plans automatically, you can queue a Saving Plans purchase for the date and time that your existing Saving Plan expires. On the scheduled date and time, AWS automatically purchases the Savings Plan for you using your account's default payment method. For instructions, see Queuing a Savings Plan purchase on the Cart page.To view owned Savings Plans and when they expire, check the AWS Cost Management console, then choose Inventory, located under Savings Plans in the navigation pane.You can also set Savings Plans alerts to remind you when your Savings Plans are about to expire. However, Savings Plan alerts don't automatically renew or purchase Savings Plans for you. You can queue your Savings Plans purchases to ensure uninterrupted coverage.

Related informationCan I schedule my EC2 Reserved Instance to renew automatically?Why aren't my Savings Plans applying to my AWS billing in the way that I expected?What should I consider before purchasing a Savings Plan?How do I save money on my AWS usage using a Savings Plan?
Question: How do I troubleshoot Amazon Connect CCP softphone errors?

I'm receiving softphone errors from my Amazon Connect Contact Control Panel (CCP) that say it can't connect to an endpoint.

Short descriptionThere are three types of Amazon Connect CCP endpoint errors:Signaling endpoint errorsMedia endpoint errorsAPI endpoint errorsThese errors appear in the Amazon Connect CCP logs as softphone errors, similar to the following examples.Note: You can use the CCP Log Parser to turn your raw CCP logs into a more read-friendly format. For more information, see CCP Log Parser on GitHub.Example Amazon Connect CCP softphone errorsSignaling endpoint errorsMedia endpoint errorsAPI endpoint errors"softphone ERROR {your contact ID} SESSION Failed connecting to signaling server Timeout" "softphone ERROR Softphone error occurred : signalling_connection_failure URL {signaling endpoint URL} cannot be reached.""softphone WARN {your contact ID} SESSION ICE collection timed out" "softphone ERROR {your contact ID} SESSION No ICE candidate"  "softphone INFO {your contact ID} SESSION ConnectSignalingAndIceCollectionState => FailedState"  "softphone ERROR Softphone error occurred : ice_collection_timeout Ice collection timedout.""ccp ERROR 'acceptContact' API request failed: [object Object]"  "ccp TRACE AWSClient: < Operation 'acceptContact' failed: {"message":"Network Failure","code":"NetworkingError","time":"....""Softphone errors occur when your Amazon Connect CCP can't communicate with one or more of the following required endpoints.Required Amazon Connect CCP endpointsEndpoint typeDomain/URL allow listPortSignalingFor CCP v1: rtc*.connect-telecom.{region}.amazonaws.com For CCP v2: *.transport.connect.{region}.amazonaws.com For more information, see Upgrade to the latest CCP.443(TCP)MediaTurnNlb-*.elb.{region}.amazonaws.com3478(UDP)API*.telemetry.connect.{region}.amazonaws.com New: additional domains to add to your allow list {myInstanceName}.my.connect.aws/ccp-v2 {myInstanceName}.my.connect.aws/api *.static.connect.aws Previously required: {myInstanceName}.awsapps.com/connect/ccp-v2 {myInstanceName}.awsapps.com/connect/api *.cloudfront.net443(TCP)Important: Make sure that you replace {region} in each domain with the location of your Amazon Connect instance. For more information, see Set up your network.

ResolutionConfirm that nothing is blocking traffic to the endpoint domain listed in the error message. For more information, see Replace Amazon EC2 and CloudFront IP range requirements with a domain allow list.Confirm that the required port for the endpoint domain listed in the error message is open on your network firewall. For more information, see Replace Amazon EC2 and CloudFront IP range requirements with a domain allow list.If you're allowing IP address ranges, then confirm that all IP addresses used by Amazon Connect are on the required allow lists. For more information, see Allow IP address ranges.Confirm that your network connection is stable enough to allow the Amazon Connect CCP to maintain connection with the required endpoints.

Related informationTroubleshooting issues with the CCPSet up your network
Question: Why doesn't my EFS file system automatically mount when rebooting my EC2 instance?

I've added an Amazon Elastic File System (Amazon EFS) mount entry in the /etc/fstab on my Amazon Elastic Compute Cloud (Amazon EC2) instance. Amazon EFS doesn’t automatically mount on reboot. How can I fix this?Short descriptionAmazon EFS auto mounts on reboot using the Amazon EFS mount helper or the Linux NFS client. Auto mounting might fail for the following reasons:The Amazon EFS mount helper isn't installed.The Linux NFS client isn't installed.The _netdev option isn't included in the EFS mount entry in /etc/fstab.

ResolutionAmazon EFS mount helperThe Amazon EFS mount helper is a part of amazon-efs-utils. This package is available for installation on Amazon Linux and Amazon Linux 2 AMIs.Check if the amazon-efs-utils package is installed on the instance:$ rpm -qa amazon-efs-utilsIf the package isn't installed, then run the following command to install it Amazon Linux and Amazon Linux 2 AMIs:$ sudo yum install -y amazon-efs-utilsFor more information, see Installing the Amazon EFS client on Amazon Linux and Amazon Linux 2.To install amazon-efs-utils on other Linux distributions, see Installing the Amazon EFS client on other Linux distributions.Linux NFS clientVerify that the Linux NFS client is installed on the instance.Note: Use the Linux NFS client only when encryption or access points aren't used.If the package isn't installed, then run the following commands to install it:Amazon Linux 1, Amazon Linux 2, RHEL$ sudo yum -y install nfs-utilsUbuntu$ sudo apt-get -y install nfs-commonRun one of the following commands to start the service:$ sudo service nfs start-or-$ sudo service nfs-server startFor more information see, Installing the NFS client._netdev optionThe automount could fail if _netdev option isn't used in the EFS mount entry in /etc/fstab. The _netdev option prevents the operating system from mounting EFS until the network is enabled as EFS required network access.

Related informationRecommended NFS mount options
Question: What are the differences between Standard and Convertible Reserved Instances?

I'm interested in using an Amazon Elastic Compute Cloud (Amazon EC2) Reserved Instance. What are the differences between a Standard Reserved Instance and a Convertible Reserved Instance?ResolutionThe size of the discount you receive by using Reserved Instances depends on whether you're using a Standard Reserve Instance or a Convertible Reserve Instance:Standard RIs provide the largest discount for a specific instance type over a long-term contract.Convertible RIs provide a smaller discount, but let you change to certain other instance types during the contract. You can also change other attributes during the contract. For more information, see Exchange Convertible Reserved Instances.For a comparison of Standard and Convertible Reserved Instances, see Types of Reserved Instances (offering classes).

Related informationReserved Instances
Question: How do I troubleshoot S3 related errors while setting up ELB access logging?

I'm getting an error while setting up Elastic Load Balancing (ELB) access logs using an Amazon Simple Storage Service (Amazon S3) bucket.

Short descriptionTo use access logs with your load balancer, the load balancer and the Amazon S3 bucket must be in the same account. You must also attach a bucket policy to the Amazon S3 bucket that allows ELB permission to write to the bucket. Depending on the error message that you receive, see the related resolution section.Note: Network Load Balancers (NLB) support access logs only for Transport Layer Security (TLS) listeners. The log contains information about TLS requests made to the Network Load Balancer. Transmission Control Protocol (TCP) is not supported.Resolution"S3Bucket: my-access-log-bucket is not located in the same region with ELB: app/my-load-balancer/50dc6c495c0c9188"This error indicates that your Amazon S3 bucket and load aren't located in the same AWS Region. The Amazon S3 bucket can be in a different Region but must be in the same account as the load balancer."Access Denied for bucket: my-access-log-bucket. Please check S3bucket permission"This error indicates that the Amazon S3 bucket doesn't have a policy that grants permission to write the access logs.To resolve this error, verify that the bucket policy grants permission to write logs to your bucket. Confirm that you have the correct placeholders for the name and prefix of your bucket. Confirm you have the correct ID of the AWS account for Elastic Load Balancing, based on the Region for your load balancer.For more information on the required permissions, see:Application Load Balancer: Bucket permissionsNetwork Load Balancer: Bucket requirementsClassic Load Balancer: Attach a policy to your S3 bucketServer-side encryption with Amazon S3 managed keys (SSE-S3) can be used to encrypt access logs for ELB. Additionally, Network Load Balancers support AWS Key Management Service (AWS KMS) customer managed keys to encrypt access logs. You can't use AWS KMS managed keys for encrypting ELB access logs. "The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again."If you receive this error, verify that your access logs bucket prefix doesn't include "AWSLogs."Additional troubleshootingIf you verified your S3 bucket policy and configuration but still can't view logs, verify that the load balancer is receiving traffic. To verify whether the load balancer is receiving traffic, check the ActiveConnectionCount and RequestCount metrics.
Question: How do I resolve a preupgrade check failure in Amazon RDS for MySQL?

I want to perform a major upgrade from Amazon Relational Database Service (Amazon RDS) for MySQL 5.7 to MySQL 8.0. However, I'm experiencing a preupgrade check failure. How do I resolve this?Short descriptionIf your DB instance experiences a preupgrade check failure, then your Amazon RDS for MySQL version upgrade is stopped. When incompatibilities are detected, Amazon RDS provides a log file for you to review the details of the failed precheck.Note: There are different prechecks that are built into the MySQL database and Amazon RDS. Also, prechecks aren't run for upgrades for versions lower than MySQL 5.7. For upgrades from MySQL 5.6 to MySQL 5.7, prechecks are limited to detecting orphan tables and sufficient storage space to rebuild tables.

ResolutionWhen you perform an upgrade from MySQL 5.6.x to 5.7.x, or from MySQL 5.7.x to 8.0.x, Amazon RDS automatically runs prechecks. The prechecks detect any data incompatibilities that might affect your upgrade. Prechecks are designed to minimize any unplanned downtime during a version upgrade.If you experience a preupgrade check failure during one of these version upgrades, review the PrePatchCompatibility log file generated by Amazon RDS. You can view the PrePatchCompatibility log file under Logs & eventsin the Amazon RDS console. Then, review the details of the listed incompatibility issues and correct the issue. In most cases, the log entry will include a link to the Amazon RDS for MySQL documentation on how to correct the incompatibility.Tip: It's a best practice to test your DB instance before a major version upgrade.
Question: How do I allocate memory to work as swap space in an Amazon EC2 instance by using a swap file?

I want to allocate memory to work as a swap file in an Amazon Elastic Compute Cloud (Amazon EC2) instance. How do I do that?Short descriptionWhen physical RAM is already in use, Amazon EC2 instances use swap space as a short-term replacement for physical RAM.Contents of RAM that aren't in active use or that aren't needed as urgently as other data or instructions can be temporarily paged to a swap file. This frees up RAM for more immediate use.You can also create swap space on a partition. For more information, see How do I allocate memory to work as swap space on an Amazon EC2 instance using a partition on my hard drive?Note: It's a best practice to create swap space only on ephemeral storage instance store volumes.

ResolutionBefore beginning this resolution, verify that your file system supports the usage of swap files.Note: Most of the common file systems (ext3, ext4, XFS) are supported. This may not be the same for other filesystems. It is the best practice to review the latest file system documentation.Calculate the swap space sizeFor information on how to calculate the size of your swap space, see the following:All about Linux swap space on the linux.com website.How much swap do I need? on the help.ubuntu.com website.Create a swap file1.    Use the dd command to create a swap file on the root file system. In the command, bs is the block size and count is the number of blocks. The size of the swap file is the block size option multiplied by the count option in the dd command. Adjust these values to determine the desired swap file size.The block size you specify should be less than the available memory on the instance or you receive a "memory exhausted" error.In this example dd command, the swap file is 4 GB (128 MB x 32):$ sudo dd if=/dev/zero of=/swapfile bs=128M count=322.    Update the read and write permissions for the swap file:$ sudo chmod 600 /swapfile3.    Set up a Linux swap area:$ sudo mkswap /swapfile4.    Make the swap file available for immediate use by adding the swap file to swap space:$ sudo swapon /swapfile5.    Verify that the procedure was successful:$ sudo swapon -s6.    Start the swap file at boot time by editing the /etc/fstab file.Open the file in the editor:$ sudo vi /etc/fstabAdd the following new line at the end of the file, save the file, and then exit:/swapfile swap swap defaults 0 0Related informationRHEL - Adding swap space
Question: How can I use SCPs and tag policies to prevent users in my AWS Organizations member accounts from creating resources?

I want to prevent users in my AWS Organizations member accounts from creating AWS resources using a Service control policies (SCPs) or tag policies.

Short descriptionSCPs can be used to manage permissions in your organization, but not to grant permission. For more information, see Service control policies (SCPs).Tag policies can be used to maintain standardized tags with AWS resources for accounts with Organizations. For more information, Tag policies.

ResolutionUse the following SCP or tag policy based on your use case.Use tag policies to prevent tagging on existing resourcesThe tag policies are checked when you perform operations that affect the tags on an existing resource. For example, tag policies can enforce that users can't change the specified tag on AWS resources to a non-compliant tag.The following example tag policy allows the tag key-value pair as Environment-Production enforced for Amazon Elastic Compute Cloud (Amazon EC2) instances. The policy prevents users from changing this tag on existing Amazon EC2 instances, but it doesn't prevent launching new instances with non-compliant tags, or no tags.{  "tags": {    "Environment": {      "tag_key": {        "@@assign": "Environment"      },      "tag_value": {        "@@assign": [          "Production"        ]      },      "enforced_for": {        "@@assign": [          "ec2:instance"        ]      }    }  }}Use SCPs to prevent tagging for creating new resourcesYou can use SCPs to prevent the creation of new AWS resources that aren't tagged for your Organization’s tagging restriction guidelines. To make sure that the AWS resources are created only if a certain tag is present, use the example SCP policy to require a tag on specified created resources.

Related informationWhat's the difference between an AWS Organizations service control policy and an IAM policy?
Question: How do I prevent an IAM user or role from setting up Amazon SageMaker Canvas?

I want to prevent AWS Identify and Access Management (IAM) users and AWS IAM Identity Center (successor to AWS Single Sign-On) users from setting up Amazon SageMaker Canvas.

ResolutionTo prevent an IAM user or role from setting up the SageMaker Canvas app, first create an IAM policy to deny the required permissions. Then, attach this policy to the SageMaker execution role.Do the following:1.    Open the IAM console.2.    In the navigation pane, choose Policies.3.    Choose Create policy, and then choose the JSON tab.4.    Copy and paste the following IAM policy in the policy editor:{  "Version": "2012-10-17",  "Statement": [    {      "Sid": "AllowSageMakerCreateAppOperations",      "Effect": "Allow",      "Action": "sagemaker:CreateApp",      "Resource": "*"    },    {      "Sid": "DenySageMakerCanvasCreateApp",      "Effect": "Deny",      "Action": "sagemaker:CreateApp",      "Resource": "arn:aws:sagemaker:example-region:1111222233334444:app/example-domain/example-user-name/canvas/*"    }  ]}Be sure to replace the following in the policy:example-region with the Region of your choice1111222233334444 with your account ID.example-domain with your SageMaker Studio domain ID.example-user-name with your SageMaker Studio user profile name.5.    Resolve any security warnings, errors, or general warnings generated during policy validation, and then choose Review policy.6.    Choose Next: Tags.7.    On the Review policy page, enter a Name and a Description (optional) for the policy that you're creating. Review the policy Summary, and then choose Create policy to save your work.8.    In the list of policies displayed, choose the policy that you created.9.    Choose the Policy usage tab, and then choose Attach.10.    From the list of IAM users and roles that appears, select the SageMaker execution role for the Studio user.11.    Choose Attach policy.If you try to set up the SageMaker Canvas app after completing the preceding steps, you get the following error:SageMaker is unable to use your associated ExecutionRole [<SageMaker Studio User Execution Role>] to create app. Verify that your associated ExecutionRole has permission for 'sagemaker:CreateApp'.

Related informationAmazon SageMaker Canvas