VishaalY/solutions-architect-hf-dataset huggingface dataset:
Question: Why am I unable to perform elastic resize for my Amazon Redshift cluster?

I tried to perform an elastic resize using AWS CloudFormation for my Amazon Redshift cluster. However, it performed a classic resize instead. Why is this happening?ResolutionImportant: If you resized the cluster using the Amazon Redshift console, it isn't registered in the AWS CloudFormation template. Instead, use the AWS CloudFormation template to be sure that the numberofNodes parameter gets updated. Otherwise, Amazon Redshift might perform a classic resize, despite meeting the resize requirements. Amazon Redshift behaves this way when there are no changes to the node count since the last resize.Amazon Redshift performs a classic resize if any of these requirements aren't met:Only the numberofNodes parameter is modified.For dc2.large or ds2.xlarge node types, you can only double the node count or decrease the node count by half of the original cluster.For dc2.8xlarge or ds2.8xlarge node types, you can resize up to two times the original node count, or resize down to half of the original node count. For example, you can resize a 16 node cluster to any size that is between 8 and 32 nodes.The number of nodes cannot exceed the number of slices. The number of slices are determined when the Amazon Redshift cluster is launched. For example, if you launch a cluster with two dc2.large nodes, then there are four slices of the cluster. Therefore, you'll only be able to increase your node count to four nodes when using elastic resize.If your Amazon Redshift cluster performed a classic resize, investigate the following areas:Check the Amazon Redshift console to confirm the actual number of nodes in your cluster. Verify whether it matches the numberofNodes parameter in your AWS CloudFormation template.Use the DescribeClusters API to retrieve information from AWS CloudTrail and determine root cause analysis. Look for the elasticResizeNumberOfNodeOptions parameter in the AWS CloudTrail logs to verify whether your Amazon Redshift cluster is eligible for an elastic resize. If the parameter does not list an option to update node count, it confirms that the cluster slices failed to meet the elastic resize requirements.Note: Before updating the node count for your Amazon Redshift cluster, use the DescribeNodeConfigurationOptions API. The DescribeNodeConfigurationOptions API can help you determine the appropriate node configurations for an elastic resize such as node count and type.

Related informationHow do I resize an Amazon Redshift cluster?Overview of managing clusters in Amazon Redshift
Question: How can I troubleshoot GuardDuty custom Amazon SNS notifications that are not being delivered?

Why are my Amazon GuardDuty custom Amazon Simple Notification Service (Amazon SNS) notifications not being delivered?Short descriptionI followed the instructions to configure an Amazon EventBridge rule for GuardDuty to send custom SNS notifications if specific AWS service event types trigger. However, the SNS notifications weren't delivered.

ResolutionFollow these instructions to confirm the correct settings for:Amazon SNS subscription confirmation.Amazon SNS topic AWS Identity and Access Management (IAM) access policy.AWS Key Management Service (AWS KMS) permissions.EventBridge event pattern JSON object finding type.Confirm the Amazon SNS subscriptionOpen the Amazon SNS console, and then choose Subscriptions.For your Amazon SNS subscription ID, verify that the status is Confirmed.If the status is Pending confirmation, follow the instructions to confirm the subscription.Confirm permissions for the SNS topic access policyOpen the Amazon SNS console, and then choose Topics.In Name, choose your Amazon SNS topic.In Details, choose the Access policy tab.Verify that the IAM policy allows permission to publish the events.amazonaws.com principal similar to the following:{      "Sid": "AWSEvents",      "Effect": "Allow",      "Principal": {        "Service": "events.amazonaws.com"      },      "Action": "sns:Publish",      "Resource": "arn:aws:sns:YOUR-REGION:YOUR-ACCOUNT-ID:YOUR-SNS-TOPIC"}Confirm AWS Key Management Service (AWS KMS) permissionsOpen the AWS KMS console, and then choose Customer managed keys.In Key ID, choose your AWS KMS key.In Key policy, choose Switch to policy view.Verify that the KMS key policy allows permission to publish the events.amazonaws.com principal similar to the following:{    "Sid": "AWSEvents",    "Effect": "Allow",    "Principal": {        "Service": "events.amazonaws.com"    },    "Action": [        "kms:GenerateDataKey",        "kms:Decrypt"    ],    "Resource": "*"}Confirm the EventBridge event pattern JSON object finding typeOpen the EventBridge console, and then choose Rules.In Name, choose your rule.In Event pattern, verify that the JSON object finding type matches the specific AWS service similar to the following:{  "source": [    "aws.guardduty"  ],  "detail-type": [    "GuardDuty Finding"  ]}Related informationMonitoring your security with GuardDuty in real time with Amazon Elasticsearch Service (Amazon ES)GuardDuty finding types
Question: How do I check running queries for my Amazon RDS MySQL DB instance?

I need to see which queries are actively running on an Amazon Relational Database Service (Amazon RDS) DB instance that is running MySQL. How can I do this?ResolutionTo see which queries are actively running for MySQL DB instance on Amazon RDS, follow these steps:1.    Connect to the DB instance running the MySQL.2.    Run the following command:SHOW FULL PROCESSLIST\GNote: If you don't use the FULL keyword, only the first 100 characters of each statement are shown in the Info field.3.    Or, run the following query to retrieve the same result set:SELECT * FROM INFORMATION_SCHEMA.PROCESSLISTNote: Your user account must be granted the administration privilege for the MySQL PROCESS server to see all the threads running on an instance of MySQL. Otherwise, SHOW PROCESSLIST shows only the threads associated that are with the MySQL account that you're using. Also note that SHOW FULL PROCESSLIST and INFORMATION_SCHEMA.PROCESSLIST statements can negatively affect performance because they require a mutex.

Related informationMySQL documentation for The MySQL Command-Line ClientMySQL documentation for --tee=file_nameMySQL documentation for MySQL WorkbenchMySQL documentation for The INFORMATION_SCHEMA PROCESSLIST Table
Question: How do I resolve the error "CloudFront wasn't able to connect to the origin"?

I'm using Amazon CloudFront to serve content, but my users are receiving the HTTP 502 error "CloudFront wasn't able to connect to the origin." What's causing this error?ResolutionHTTP 502 errors from CloudFront can occur because of the following reasons:There's an SSL negotiation failure because the origin is using SSL/TLS protocols and ciphers that aren't supported by CloudFront.There's an SSL negotiation failure because the SSL certificate on the origin is expired or invalid, or because the certificate chain is invalid.There's a host header mismatch in the SSL negotiation between your CloudFront distribution and the custom origin.The custom origin isn't responding on the ports specified in the origin settings of the CloudFront distribution.The custom origin is ending the connection to CloudFront too quickly.For detailed instructions on how to troubleshoot these issues, see HTTP 502 status code (Bad Gateway).

Related informationTroubleshooting error responses from your originHow do I troubleshoot a 502: "The request could not be satisfied" error from CloudFront?
Question: How do I avoid RequestLimitExceeded errors when I use PowerShell to programmatically launch multiple Amazon EC2 instances?

When I use PowerShell to launch multiple Amazon Elastic Compute Cloud (Amazon EC2) instances, I sometimes receive RequestLimitExceeded errors.

ResolutionA RequestLimitExceeded error for Amazon EC2 APIs usually indicates request rate limiting or resource rate limiting API throttling. You can use a combination of retry logic and exponential backoff strategies to work around this issue.Launching an Amazon EC2 instance is a mutating call, and is subject to both request rate and resource rate limiting. The script that you use to launch the instances must accommodate the refill rate of the token bucket.Use one of the following delayed invocation or retry strategies to avoid RequestLimitExceeded errors.Note: AWS SDK for .NET has a built-in retry mechanism that is turned on by default. To customize the timeouts, see Retries and timeouts.The following example includes a delayed invocation mechanism for your requests. The delayed invocation allows the request bucket to fill up:# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.# SPDX-License-Identifier: MIT-0# Example Code to launch 50 EC2 instances of type 'm5a.large'.try {      $params = @{    ImageId = '<AMI_ID>'    InstanceType = 'm5a.large'    AssociatePublicIp = $false    SubnetId = '<Subnet_ID>'    MinCount = 10    MaxCount = 10     }  for ($i=0;$i<=5;$i++){    $instance = New-EC2Instance @params    Start-Sleep 5000 #Sleep for 5 seconds to allow Request bucket to refill at the rate of 2 requests per second    }} catch {    Write-Error "An Exception Occurred!"}The following example includes retry logic in the script:# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.# SPDX-License-Identifier: MIT-0#Example Code to launch 50 EC2 instances of type 'm5a.large'.$Stoploop = $false[int] $Retrycount = "0"do {    try {        $params = @{            ImageId = '<AMI_ID>'            InstanceType = 'm5a.large'            AssociatePublicIp = $false            SubnetId = '<Subnet_ID>'            MinCount = 50            MaxCount = 50        }    $instance = New-EC2Instance @params    $Stoploop = $true    } catch {        if ($Retrycount -gt 3) {            Write - Host "Could not complete request after 3 retries."            $Stoploop = $true        } else {           Write-Host "Could not complete request retrying in 5 seconds."           Start-Sleep -Seconds 25            #25 seconds of sleep allows for 50 request tokens to be refilled at the rate of 2/sec           $Retrycount = $Retrycount + 1           }        }    } While($Stoploop -eq $false)

Related informationRequest throttling for the Amazon EC2 APIRetry behavior
Question: What is Amazon S3 Glacier provisioned capacity?

I want to use Amazon Simple Storage Service Glacier provisioned capacity.

ResolutionWith Amazon S3 Glacier provisioned capacity units, you can pay a fixed upfront fee for a given month to ensure the availability of retrieval capacity for expedited retrievals from Amazon S3 Glacier vaults. You can purchase multiple provisioned capacity units per month to increase the amount of data you can retrieve. For information on the maximum number of provisioned capacity units that you can purchase per account, see Service quotas.Important: Most use cases don't require the purchase of provisioned capacity units. Purchase provisioned capacity units only if the following are true:You have a lot of data stored in Amazon S3 Glacier.You plan to frequently retrieve large amounts of data from Amazon S3 Glacier in a given month.Your use case demands that the data you retrieve is accessible within minutes.

Related informationAccessing Amazon S3 GlacierAmazon S3 Glacier pricing
Question: Why is the restore of my Amazon DynamoDB table taking a long time?

I'm trying to restore my Amazon DynamoDB table, but the restore process is taking a long time.

ResolutionWhen you restore your DynamoDB table from its backup, the restore process is completed in less than an hour in most cases. However, restore times are directly related to the configuration of your table, such as the size of your table, number of underlying partitions, and other related variables. When you plan disaster discovery, it's a best practice to regularly document average restore completion times and establish how these times affect your overall Recovery Time Objective.The time DynamoDB takes to restore a table varies based on multiple factors and is not necessarily correlated directly to the size of the table. If your table contains data with significant skew and includes secondary indexes, then the time to restore might increase. When the restore process is in progress, the table status is Restoring. When restore is completed, the table shows the status as Active. All backups in DynamoDB work without consuming any provisioned throughput on the table.Keep the following in mind when you are restoring a DynamoDB table from its backup:The restore times aren't always correlated directly to the size of the table.When you perform a point-in-time recovery of a DynamoDB table, the restore process takes at least 20 minutes irrespective of the size of the table. This is because after you restore, DynamoDB needs time to provision all resources to create the new table and initiate the restore process to copy the actual data.If data in the table is evenly distributed, then the restoration time is proportional to the largest single partition by item count.If the data is skewed, the restoration time might increase due to potential hot key throttling. For example, if your table’s primary key is using the month of the year for partitioning, and all your data is from the month of December, then you have skewed data.Restoring a table can be faster and more cost efficient if you exclude secondary indexes from being created.Restoration times for two different tables of different schemas and data can't be compared. This is because the restoration time for a table depends upon the data skewness on partition level.

Related informationUsing DynamoDB backup and restore
Question: Why am I seeing duplicate messages in Amazon SQS for the same Amazon S3 event?

I'm seeing duplicate messages in Amazon Simple Queue Service (Amazon SQS) for the same Amazon Simple Storage Service (Amazon S3) event. Why is this happening?ResolutionAmazon S3 is designed to deliver notifications with a high degree of reliability using built-in backoff and retry mechanisms. In rare occasions, the retry mechanism might cause duplicate notifications for the same object event.Amazon S3 event notifications are delivered as JSON objects that contain a sequencer key. This key is a hexadecimal value that you can use to identify the event sequence of PUTs and DELETEs for the same object. Duplicate event notifications for a specific object event have the same value for the sequencer key.For applications that must identify duplicate notifications, it's a best practice to maintain a secondary database or index of S3 objects using event notifications. Then, store and compare the sequencer key values to check for duplicates as each event notification is processed.
Question: How do I calculate the Agent non-response metric in Amazon Connect?

I want to know how to calculate the Agent non-response metric in Amazon Connect.

ResolutionThe Agent non-response metric increases when an agent doesn't accept an incoming contact, or the caller disconnects the call. Amazon Connect tracks the Agent non-response metric as a real-time metric and a historical metric.You can use the contact trace records (CTRs) and contact ID to manually calculate the Agent non-response metric. The contact ID must have the queue name for the queue that you're calculating the Agent non-response metric for. The following attributes indicate that the agent missed the contact:The Agent connection attempt value is greater than zero.The initiation method is either Inbound, Transfer, or Callback.No value is present under the Agent column, such as, a Connected to Agent timestamp or Agent interaction duration.For more information, see Contact records data model.The following scenarios increase Agent non-response metrics:Each time Amazon Connect routes a contact to an agent, but the agent doesn't answer the call. If the agent doesn't answer the call, then Amazon Connect routes the call to another agent to handle. Because agents can miss a single contact multiple times (including by the same agent), you count it multiple times.A caller disconnects when in a customer queue flow. For example, if the caller reaches a loop prompt and disconnects before the agent connects, the Agent non-response metric increases. By default, when Amazon Connect routes a call to an agent, the agent has 20 seconds to accept or decline the incoming contact.Example scenarioFor example, Amazon Connect transfers an inbound call to Queue A. Because Amazon Connect transfers the call to the queue, the customer queue flow runs. Two agents are available in Queue A, Agent A and Agent B.A call initiates to Agent A for 20 seconds, but Agent A misses the call. The call then initiates to Agent B for 20 seconds, but Agent B misses the call. There are now no agents to route the call to, and the customer queue flow starts over. Then, Agent A becomes Available, and the call initiates to Agent A for 10 seconds, but the caller disconnects before Agent A accepts the call.The Agent non-response metric value for this scenario is three.The Agent non-response metric calculates a value of three because both Agent A and Agent B miss the initiated call. Agent A is available again for the initiated call, but the caller disconnects before the agent answers the call. Because the disconnected call rang for the agent, you calculate it as an Agent non-response.

Related informationHow do I identify who disconnected a call in my Amazon Connect contact center?How do I connect agents in my Amazon Connect contact center to incoming calls automatically?
Question: How can I integrate AWS services into my iOS app?

What's the best way to integrate AWS Cloud services into a native iOS app?ResolutionIt's a best practice to use Amplify iOS to integrate AWS Cloud services into a native iOS app. For information on how to start a project, see Amplify libraries for iOS.

Related informationGetting started (Amplify docs)How is the SDK different from the Amplify Libraries for iOS?
Question: How can I avoid Route 53 API throttling errors?

How can I avoid API throttling errors in Amazon Route 53?Short descriptionWhen you perform bulk API calls to Route 53, you might receive an HTTP 400 (Bad Request) error.A response header that contains a Code element with a value of Throttling and a Message element with a value of Rate exceeded indicates rate throttling. Rate throttling happens when the number of API requests is greater than the hard limit of five requests per second (per account).If Route 53 can't process the request before the next request for the same hosted zone, Then subsequent requests are rejected with another HTTP 400 error. The response header contains both of the following:A Code element with a value of PriorRequestNotCompleteA Message element with a value of the request was rejected because Route 53 was still processing a prior request.API calls from AWS Identity and Access Management (IAM) users in the same account count towards global rate throttling for the account. API calls from these IAM users also impact API calls made from the AWS Management Console.

ResolutionNote: 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.Use the following methods to avoid rate throttling.Batching requestsGroup individual operations of the same type into one change batch operation to reduce API calls using the AWS CLI or your preferred SDK.For example, request to CREATE, DELETE, or UPSERT (update and insert) several records with one batch operation. Use the change-resource-record-sets command in the AWS CLI to perform bulk resource record operations.Be aware that:UPSERT requests (update and insert) are counted twice.There are quotas for the elements and characters in change-resource-record-sets API calls.Use error retries and exponential backoffTo avoid throttling, add error retries and exponential backoff to your Route 53 API calls. For example, use a simple exponential backoff algorithm that retries the call in 2^i seconds, where i is the number of retries.Randomize start timesRandomize the start time for calling Route 53 APIs. Be sure that there aren't multiple applications processing the logic at the same time. Simultaneous requests can cause throttling.Introduce "sleep time" between callsIf the code function calls to Route 53 APIs are consecutive, add "sleep time" between the two calls to minimize the risk of throttling.

Related informationQuotas (Route 53)
Question: How can I delete an Amazon VPC link for my Amazon Gateway REST API?

I'm trying to delete my Amazon Virtual Private Cloud (Amazon VPC) link for my Amazon Gateway REST API and received the following error:"Cannot delete VPC link referenced in format of [Method:Resource]."How can I resolve this?Short descriptionIf a resource using the Amazon VPC link integration is deleted, then you can't delete the link.

ResolutionTo delete the Amazon VPC link, follow these steps depending on whether the REST API was or was not deployed.Deployed REST APIsSwitch the integration type from the Amazon VPC link to another type. For example, a mock integration, HTTP integration, or AWS integration type. After switching the integration type, redeploy the REST API to the same stage name that you previously deployed. Then, try deleting the Amazon VPC link again.Undeployed REST APIsSwitch the integration type from the Amazon VPC link to another type. For example, a mock integration, HTTP integration, or AWS integration type. Then, try deleting the Amazon VPC link again.

Related informationTutorial: Build a REST API with API Gateway private integrationHow can I access an API Gateway private REST API in another AWS account using an interface VPC endpoint?