VishaalY/solutions-architect-hf-dataset huggingface dataset:
Question: How do I set up an Active/Active or Active/Passive Direct Connect connection to AWS from a private or transit virtual interface?

How do I set up an Active/Active or Active/Passive AWS Direct Connect connection to AWS from a private or transit virtual interface?ResolutionScenarios with connections in the same RegionScenario 1:Both connections are in the same Region and same colocation.The same prefixes are advertised with the same Border Gateway Protocol (BGP) attributes (such as AS Path and MED) on both the connections from the on-premises location.Egress traffic from AWS to the on-premises location is load balanced based on flow (Active/Active) across both Direct Connect connections.Scenario 2:Both connections are in the same Region but in different colocations facilities.The same prefixes are advertised with the same BGP attributes (such as AS Path and MED) on both the connections from the on-premises location.Egress traffic from AWS to the on-premises location is load balanced based on flow (Active/Active) across both Direct Connect connections.Scenarios with connections in different RegionsScenario 1:Connection A (virtual interface VIF-A) is in Region 1.Connection B (virtual interface VIF-B) is in Region 2.Both virtual interfaces connect to a virtual private cloud (VPC) in Region 1 using a Direct Connect gateway.Both virtual interfaces advertise the same prefixes with the same BGP attributes (such as AS Path and MED) on both the connections from the on-premises location.Egress traffic from the VPC to the on-premises location prefers connection A because it's in the same Region as the VPC.Scenario 2:Connections are two Regions and two colocations facilities.Connection A (virtual interface VIF-A) is in Region 1.Connection B (virtual interface VIF-B) is in Region 2.Both virtual interfaces connect to a VPC in Region 3 using a Direct Connect gateway.Both virtual interfaces advertise the same prefixes with the same BGP attributes (such as AS Path and MED) from the on-premises location.Egress traffic from AWS to the on-premises location is load balanced based on flow (Active/Active) across both Direct Connect connections.Methods for more predictable routingFor more predictable routing than what's possible in the scenarios previously described, use the following methods.For Active/Passive configuration of Direct Connect connections:Apply the local preference BGP community tag. Set a higher preference to the advertised prefixes for the primary or active connection. Then, set a medium or lower preference for the passive connection.AS Path prepend using a shorter AS path on the active connection and a longer AS path on the passive connection.Note: AS Path prepending can't be used to configure Active/Passive connections in environments similar to scenario 1 of "Scenarios with connections in different Regions".Advertise the most specific route using BGP on the active connection.For Active/Active configuration of Direct Connect connections, advertise the prefixes on both Direct Connect connections with the same local preference BGP community tag.
Question: How do I graph older metrics that aren't listed on the CloudWatch console?

I want to graph older metrics that are no longer listed on the Amazon CloudWatch console. How can I do this?Short descriptionIf data isn't published for more than 14 days, then a metric no longer appears on the CloudWatch console and can't be retrieved using ListMetrics. You can no longer search for this metric to graph it. To view the metric, you must manually provide the metric source.The example in this article shows you how to view metrics for a terminated Amazon Elastic Compute Cloud (Amazon EC2) instance.

ResolutionNote: Before you begin, check that you have the correct NameSpace, Metric Name and all the Dimensions associated with that metric. A metric is a unique combination of Namespace, MetricName, and Dimension. Note that metric values are case sensitive.Open the CloudWatch console.In the navigation pane, in the Metrics section, choose All metrics.Choose Source, and then enter the JSON block for the metric that you want to graph. This example graphs the CPUUtilization metric of an instance that was terminated 15 days ago:{    "view": "timeSeries",    "metrics": [        [ "AWS/EC2", "CPUUtilization", "InstanceId", "i-abc123456789" ]    ],    "region": "us-east-1"}If there are multiple dimensions in the metric that you want to graph, be sure to include them in the metrics section using this format:[ "NameSpace", "MetricName", "Dimension Key", "Dimension Value" ]To graph multiple metrics, add a comma after the end bracket if there isn't one already. Then, add this to the metrics section:["NameSpace1", "MetricName1", "Dimension Key1", "Dimension Value1"], ["NameSpace2", "MetricName2", "Dimension Key2, "Dimension Value2"]After you add the JSON to graph your metric, chooseGraph metrics. You can now adjust theTime Range,Period andStatistic.

Related informationAdding old metrics to a graph
Question: "How can I scale my request rate to S3, to improve request rate performance?"

I expect my Amazon Simple Storage Service (Amazon S3) bucket to get high request rates. What object key naming pattern should I use to get better performance?ResolutionAmazon S3 automatically scales by dynamically optimizing performance in response to sustained high request rates. Your application can achieve 3,500 PUT/COPY/POST/DELETE or 5,500 GET/HEAD requests per second per prefix in a bucket. There are no limits to the number of prefixes in a bucket. You can increase your read or write performance by using parallelization. If Amazon S3 is optimizing for a new request rate, you receive a temporary HTTP 503 request response until the optimization completes. Because Amazon S3 optimizes its prefixes for request rates, unique key naming patterns are no longer a best practice.For more information about Amazon S3 performance optimization, see Performance guidelines for Amazon S3 and Performance design patterns for Amazon S3.
Question: Why is my Kinesis data stream returning a 500 Internal Server Error?

My Amazon Kinesis data stream is returning a 500 Internal Server Error or a 503 Service Unavailable Error. How do I detect and troubleshoot these errors within Amazon Kinesis Data Streams?Short DescriptionIf you are producing to a Kinesis data stream, one of the following internal errors can occur:PutRecord or PutRecords returns an AmazonKinesisException 500 or AmazonKinesisException 503 error with a rate above 1% for several minutes.SubscribeToShard.Success or GetRecords returns an AmazonKinesisException 500 or AmazonKinesisException 503error with a rate above 1% for several minutes.You can troubleshoot these internal errors by doing the following:Calculate your error rate.Implement a retry mechanism.

ResolutionCalculate your error rateLook for significant drops in the time windows of either PutRecord.Success or GetRecord.Success under the Monitoring tab. If you notice significant drops, calculate the error rate to determine the severity of your Kinesis data stream issue.To calculate your error rate, compute the average value of PutRecord.Success and GetRecord.Success.Implement a retry mechanismAfter you've calculated your error rate, confirm whether the error rate falls below 0.1%. Kinesis Data Streams allows for high throughput writes with a low error rate. Average error rates are typically below 0.01%.If you wrote your own consumer or producer, implement a retry mechanism in your application code. For more information about retry mechanism implementations, see the Retries section in Implementing efficient and reliable producers with the Amazon Kinesis Producer Library.If your error rate exceeds 1% for several minutes, contact AWS Support. Provide the following information:Applications used to read or write data to/from Data StreamsNumber of shards in your Kinesis data streamServer-side encryption settingsSpecific shard IDs that are impactedTime frame where drops in success rates are observedRequest IDs that are reporting internal failuresRelated InformationDeveloping producers using the Amazon Kinesis Producer LibraryDeveloping KCL 2.x consumers
Question: How do I use the restore tiers in the Amazon S3 console to restore archived objects from Amazon S3 Glacier storage class?

How do I use the restore tiers in the Amazon Simple Storage Service (Amazon S3) console to restore objects from Amazon S3 Glacier Flexible Retrieval storage class?ResolutionNote: The information in this article doesn't apply to Amazon S3 Glacier Deep Archive, or S3 Glacier Instant Retrieval.If you archived Amazon S3 objects to S3 Flexible Retrieval storage class using a lifecycle rule, then you can choose from three options to restore them:Expedited retrievalStandard retrievalBulk retrievalFollow these steps to restore an archived object using the Amazon S3 console. Choose a restore tier that meets your needs:1.    Open the Amazon S3 console, and choose the Amazon S3 bucket that stores the archived objects that you want to restore.2.    Select the archived object, and choose Actions.3.    Select Initiate restore, and then specify the number of days that you want the restored file to be accessible for.4.    Select a Retrieval option—Bulk, Standard, or Expedited—and choose Restore.After the restoration is complete, you can download the restored object from the Amazon S3 console. Depending on the retrieval option selected, the restore completes in:1-5 minutes for expedited retrievals3-5 hours for standard retrievals5-12 hours for bulk retrievalsTo confirm that your file is restored, do the following:1.    Choose the Amazon S3 bucket that contains the file.2.    Select the check box next to the file name to view the file details. The Restoration expiry date verifies that the file is restored. This expiration date indicates when Amazon S3 removes the restored copy of your file.3.    Choose Download to download the object as a file to your local client.4.    (Optional) To permanently restore an S3 object, change the object's storage class using the AWS Command Line Interface (AWS CLI). For more information, see How can I restore an S3 object from the Amazon S3 Glacier storage class using the AWS CLI?Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent AWS CLI version.

Related informationRestoring an archived object
Question: How can I access the internet from my WorkSpace?

I want to turn on internet access from my WorkSpace in Amazon WorkSpaces. How can I do that?ResolutionThe method to turn on internet access from your WorkSpace differs depending on whether the WorkSpace is located in a private or public subnet. A public subnet sends outbound traffic directly to the internet using an internet gateway route. Instances in a private subnet access the internet using a network address translation (NAT) gateway that resides in the public subnet.Important: The security group for your WorkSpaces must allow outbound traffic on ports 80 (HTTP) and 443 (HTTPS) to all destinations (0.0.0.0/0).Turn on internet access from WorkSpaces located in a public subnetA WorkSpace that's located in a public subnet must meet requirements to turn on internet access. The WorkSpace needs both a route to an internet gateway and a public IP address assignment.Create an internet gateway.Update the route tables for your public subnets. The default route (Destination 0.0.0.0/0) must target the internet gateway.You can assign public IP addresses to your WorkSpaces automatically or manually.Automatically assign public IP addressesYou can automatically assign public IP addresses to your WorkSpaces by turning on internet access on the WorkSpaces directory. After you turn on automatic assignment, each WorkSpace that you launch is assigned a public IP address. For instructions and more information, see Configure automatic IP addresses.Note: WorkSpaces that already exist before you turn on automatic assignment don't receive an Elastic IP address until you rebuild them.Manually assign public IP addressesYou can manually assign a public Elastic IP address using the Amazon Elastic Compute Cloud (Amazon EC2) console. For instructions, see How do I associate an Elastic IP address with a WorkSpace?Turn on internet access from WorkSpaces located in a private subnetIf you use AWS Directory Service for Microsoft Active Directory, then configure the virtual private cloud (VPC) with one public subnet and two private subnets. You must configure your directory for the private subnets. To provide internet access to WorkSpaces in these private subnets, configure a NAT gateway in the public subnet.Create a NAT gateway.Update the route tables for the private subnets. The default route (Destination 0.0.0.0/0) must target the NAT gateway.

Related informationProvide internet access from your WorkSpaceConfigure a VPC for WorkSpacesNetworking and access for WorkSpaces
Question: How do I stop receiving email spam?

I want to avoid receiving spam and unsolicited emails.

ResolutionAWS doesn't allow the use of AWS infrastructure to send unsolicited mass emails, also known as "spam." This includes content such as promotions, advertising, and solicitation. If you notice any violation of this policy, then follow Amazon's abuse reporting process to help us stop or remedy the violation.To avoid receiving spam, follow these best practices everywhere on the internet:Be careful about who you provide your email address to. Spammers often obtain lists of emails legally because they purchase them from legitimate sources. When you sign up for a website or a service, be sure to read the website's privacy policy. The policy includes information on whether the owner of the website intends to sell information, such as your email address, to third parties.Avoid publishing your email address in public pages or forums.  Spammers use bots to scrape public pages and forums for email addresses. Sharing your email address in these pages can make you a potential target for spammers.Tip: Many forums provide direct messaging tools to contact other users privately. If you want to provide your email address to other users of the forum, then use these private messaging tools when available.Avoid replying to phishing emails. Always verify the legitimacy of your email source. Avoid providing personal or sensitive information to unknown senders. You might receive phishing emails in many different forms. Sometimes, the spammers pretend to be from an institution, such as a bank, or pretend that you've won a contest. If you reply to these emails, then the spammers recognize that the email address is valid, and they might sell your email address to other spammers.Use an email address that's hard to guess. Avoid using email addresses that include easy-to-guess names or phrases. Otherwise, spammers are more likely to guess your email address correctly and send you spam emails. Spammers use machine learning and other algorithms to guess possible valid email addresses. Also, avoid using your exact email address as a login for different websites.

Related informationReport suspicious emailsHow do I unsubscribe from AWS emails?How do I report abuse of AWS resources?How do I make sure that the email that I received is actually from Amazon?
Question: Why is an Amazon RDS DB instance stuck in the modifying state when I try to increase the allocated storage?

I want to increase the allocated storage for an Amazon Relational Database Service (Amazon RDS) DB instance, but the operation is stuck in the modifying state.

ResolutionBy design, storage scaling operations for an Amazon RDS DB instance have minimal impact on ongoing database operations. In most cases, the storage scaling operations are completely offloaded to the Amazon Elastic Block Store (Amazon EBS) layer and transparent from the database. This process is typically completed in a few minutes. However, for some legacy Amazon RDS storage volumes, you might require a different process for modifying the size, IOPS, or volume type of your Amazon RDS storage. You might need to make a full copy of the data using a potentially long-running I/O operation.Most RDS volume geometries include either one Amazon EBS volume or four striped EBS volumes in a RAID0 configuration depending on the size of the allocated storage. You must use the legacy method under either of the following conditions:Your RDS instance doesn't have either one or four volumes.The target size for your modification increases the allocated storage beyond 400 GB.You can view the number of volumes in use on your RDS instances using the Enhanced Monitoring metrics. Also, any source volume that uses previous generation EBS volumes require the legacy method for modifying the size of the allocated storage.The following factors can affect the time required to increase the allocated storage of an RDS DB instance:The legacy method uses I/O resources, and this could increase your database workload. It's a best practice to use the minimal impact method whenever possible. The minimal impact method doesn't use any resources on the database. If you must use the legacy method, then it's a best practice to schedule the storage increase operations outside of the peak hours. This might reduce the time required to complete the storage increase operations.If you have high load conditions and must use the legacy method, then you can create a read replica for the RDS DB instance. You can perform the storage scaling operations on the read replica and then promote the read replica DB instance to the primary DB instance.If you have high-load conditions, then do the following:Create a read replica for the RDS DB instance.Perform storage scaling operations on the read replica.Promote the read replica DB instance to the primary DB instance.After a storage modification has started, the operation can't be canceled. The DB instance status is in the modifying state until the Amazon EBS operations are complete. You can restore a DB instance to a specified time or restore from a DB snapshot to create a new DB instance with the original storage configuration. A DB instance that's restored is not in the modifying status.

Related informationTroubleshooting for Amazon RDSModifyDBInstanceUsing the Apply Immediately setting
Question: How do I perform Git operations on an AWS CodeCommit repository with an instance role on Amazon EC2 instances for Windows?

I want to perform Git operations on an AWS CodeCommit repository from an Amazon Elastic Compute Cloud (Amazon EC2) instance that runs Windows.

Short descriptionSet up the AWS Command Line Interface (AWS CLI) credential helper to perform Git operations on an AWS CodeCommit repository. Then, create an IAM role on your Amazon EC2 instance to perform pull and push actions.Note: Credential helper is the only connection method that doesn't require an IAM user for CodeCommit repositories.

ResolutionNote: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.1.    Create an IAM role for your EC2 instance, and then attach the following example IAM policy to the role. Replace arn:aws:codecommit:us-east-1:111111111111:SampleRepoName with the Amazon Resource Name (ARN) of your CodeCommit repository.{      "Version": "2012-10-17",      "Statement": [          {              "Effect": "Allow",              "Action": [                  "codecommit:GitPull",                  "codecommit:GitPush"              ],              "Resource": "arn:aws:codecommit:us-east-1:111111111111:SampleRepoName"          }      ]  }Note: The policy for step 1 allows the IAM role to perform Git pull and push actions on the CodeCommit repository. For more examples on using IAM policies for CodeCommit, see Using identity-based policies (IAM Policies) for CodeCommit.2.    Attach the IAM role that you created in step 1 to an instance.3.    Install Git on your instance. For information on Windows instances, see Downloads on the Git website.4.    Check the Git version to confirm that Git is properly installed:C:\Users\Administrator> git --version5.    Check the AWS CLI version to confirm that AWS CLI is installed:C:\Users\Administrator> aws --version6.    To set up the credential helper on the Amazon EC2 instance, run the following commands:C:\Users\Administrator> git config --global credential.helper "!aws codecommit credential-helper $@"C:\Users\Administrator> git config --global credential.UseHttpPath trueNote: The commands in step 6 specify the use of the Git credential helper with the AWS credential profile. The credential profile allows Git to authenticate with AWS to interact with CodeCommit repositories. To authenticate, Git uses HTTPS and a cryptographically-signed version of your instance role.7.    To configure your name and email address explicitly, run the following commands:C:\Users\Administrator> git config --global user.email "testuser@example.com"C:\Users\Administrator> git config --global user.name "testuser"8.    To clone the repository to the instance, copy the clone URL from the appropriate CodeCommit repository:C:\Users\Administrator> git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/SampleRepoName9.    Create a commit in your CodeCommit repository.

Related informationSet up the credential helperHow do I perform Git operations on an AWS CodeCommit repository with an instance role on Amazon EC2 instances for Amazon Linux 2?
Question: How do I upgrade my Microsoft SQL cluster on my EC2 Windows instances?

I want to upgrade my Microsoft SQL cluster on my Amazon Elastic Compute Cloud (Amazon EC2) Windows instances. How do I do this?Short descriptionUpgrading your Microsoft SQL cluster consists of the following three steps:Upgrade the Windows OS that SQL is running on.Upgrade the SQL DB engine version.Upgrade the SQL edition.

ResolutionUpgrade the Windows OS that SQL is running onWhen upgrading the underlying OS, make sure that the version of Windows you're using is compatible with your SQL version. For more information, see How can I upgrade my EC2 Windows Server instance OS to a newer version?If your cluster is 2012R2 or later, use a cluster rolling upgrade to minimize downtime.Note: Make sure that you have your SQL licensing information for reference when upgrading.Upgrade the SQL version on your Windows instanceThere are two scenarios when upgrading SQL:Upgrade a failover cluster instance (FCI) or Availability Group (AG).For more information on upgrading an FCI, see Upgrade a failover cluster instance.For more information on upgrading an AG, see Upgrading Always On Availability Group replica instances.Migrate from an older version to newer version for FCI or AG: For more information, see Upgrade SQL Server instances running on Windows Server 2008/2008 R2/2012 clusters.Upgrade the SQL Server editionUpgrade SQL Server on a failover cluster instance. On SQL Server failover cluster instances, run edition upgrade on any one of the instance's active or passive nodes.Upgrade SQL Server on AG. On AG, both nodes must be upgraded separately. In the SQL Server Installation Center, make sure to select Maintenance, Edition Upgrade.For more information, see Upgrade to a different edition of SQL Server (Setup).

Related informationHow do I troubleshoot Microsoft SQL issues on my EC2 Windows instance?How do I launch Microsoft SQL Server on an EC2 Windows instance?