VishaalY/solutions-architect-hf-dataset huggingface dataset:
Question: How can I track third-party software or applications on my EC2 instances or WorkSpaces using License Manager?

I want to track resources that are used by my Amazon Elastic Compute Cloud (Amazon EC2) instance, Amazon WorkSpaces, and so on, using Amazon License Manager.

ResolutionNote: License Manager automatically tracks individual products based on platform or application. The example in the following resolution tracks vCPUs that are consumed by Microsoft SQL Server 2019 (64-bit) in the AWS Region us-east-1. You can use the example steps to track any application or platform that's discovered by AWS Systems Manager.PrerequisitesInstall or update the SSM Agent on all of the instances that you want to track. Make sure that all of the instances that you want to track are managed in Systems Manager Inventory. For information on how to update the SSM Agent using State Manager, see Walkthrough: Automatically update SSM Agent (CLI).To track on-premises servers, make sure that they're managed instances. A managed instance is any Amazon EC2 instance, server, or virtual machine (VM) in your on-premises environment that's configured for Systems Manager.Verify that Systems Manager is discovering your resources in License ManagerAfter installing the SSM Agent, open the License Manager console. and then choose Inventory search. Verify that all resources that you want to track are listed.Create a license configurationIn the License Manager console, choose Self-managed licenses.Choose Create self-managed license.Complete the following fields:For Self-managed license name, enter the name of the license (Microsoft SQL Server 2019, in this example).For License type, enter the type of license (vCPUs, in this example).Choose Submit.Create and assign the automated discovery ruleIn the License Manager console, select Inventory search.Search by resource ID, platform name, application name, license included, or tags. In this example, search for all instances that run the application "Microsoft SQL Server 2019 (64-bit)".In the search bar field choose Application Name, Equals.Enter "Microsoft SQL Server 2019 (64-bit)" as the application name. This lists all instances that contain the application "Microsoft SQL Server 2019 (64-bit)".Select all the EC2 resources that you want to apply the auto discovery rule to, then choose Add automated discovery rules.In the Self-managed license section, select Microsoft SQL Server 2019.In the Automated discovery rules section, choose Application for Software type.For Product name, choose Microsoft SQL Server 2019 (64-bit).Select Add.Track the licenses in the License Manager dashboardOn the License Manager console dashboard, select the license name Microsoft SQL Server 2019. All the resources that use the Microsoft SQL Server 2019 (64-bit) application are listed, as well as the vCPUs in use.
Question: How do I change the burst credit behavior at an account level for my burstable performance EC2 instances?

I want to change the default burst credit behavior for each of my Amazon Elastic Compute Cloud (Amazon EC2) burstable performance instance families. How can I do this?ResolutionFor steps on how to change default burst credit behavior using the Amazon EC2 console and the AWS Command Line Interface, see Set the default credit specification for the account.Changing the default credit specification doesn't affect the credit specification for existing running or stopped instances.Note: You can modify the default credit specification for an instance family once in a rolling 5-minute period. You can make modifications up to four times in a rolling 24-hour period.

Related informationWork with burstable performance instances
Question: How long is the Amazon RDS maintenance window?

What is the duration of an Amazon Relational Database Service (Amazon RDS) maintenance window?ResolutionAmazon RDS maintenance is sometimes required to update a database engine version or the operating system (OS) of a DB instance or DB cluster. The duration of the maintenance varies based on the operations that Amazon RDS has scheduled for your DB instances, and the operations that start during the maintenance window.When you create or modify a DB instance, you can configure the maintenance window. You can schedule maintenance to occur once a week, during a specific time period that lasts between 30 minutes and up to 23 hours and 30 minutes. After configuring the window, Amazon RDS will start maintenance actions during the scheduled time period.You can minimize downtime during required Amazon RDS maintenance by modifying your DB instance to a Multi-AZ deployment before the scheduled update.Maintenance Window end timeUpdates can take longer to complete than the maintenance window time frame. For example, Amazon RDS can take longer to update if there is a large list of files that must be updated or if a DB instance needs to be restarted.After Amazon RDS has updated the instance, the duration of the downtime varies based on whether the maintenance is an OS update or a database engine version update.Note: You can't proactively start the Amazon managed maintenance period outside the maintenance window, but you can adjust your weekly maintenance period, accordingly. If you want scheduled maintenance to occur sooner, you can adjust the preferred DB instance maintenance window to occur according to your needs.

Related informationWhat happens to Amazon RDS and Amazon Redshift queries that are running during a maintenance window?How do I configure notifications for Amazon RDS or Amazon Redshift maintenance windows?
Question: How do I prepare for maintenance on my Direct Connect connection?

I received a notification that my AWS Direct Connect connection will be down temporarily for maintenance, and I want to prepare for this downtime.

Short descriptionWhen a Direct Connect connection is down for maintenance, that connection can be down from a few minutes to a few hours. To prepare for this downtime, take one of the following actions:Request a redundant Direct Connect connection.Configure a virtual private network (VPN) connection as a backup.It's a best practice to shift your traffic to another circuit during Direct Connect maintenance. To prevent any production traffic disruption, use one of the preceding options before the scheduled maintenance period. You can also use the AWS Direct Connect Resiliency Toolkit to perform scheduled failover tests and verify the resiliency of your connections.

ResolutionRequest a redundant Direct Connect connectionIf you request multiple connections to the same co-location site from the same AWS account, then AWS configures them on separate routers. Direct Connect performs maintenance on a single router at a time, so one connection stays up.If you request a redundant connection at a different co-location site, then you have a secondary connection when the first is down for maintenance. If an infrastructure event affects the entire co-location site, then you can use this second connection.For information on requesting a new Direct Connect connection, see Request an AWS Direct Connect dedicated connection.Configure a VPN connection as a backupFor a shorter-term or lower-cost solution, configure an AWS Site-to-Site VPN as a failover option for a Direct Connect connection. Because VPN connections generally offer less bandwidth than Direct Connect connections, be sure that your use case or application can tolerate a lower bandwidth.

Related informationVPN connection as a backup to AWS DX connection exampleWhat is AWS Direct Connect?Connect your VPC to remote networks using AWS Virtual Private Network
Question: How do I create and copy an Amazon Machine Image (AMI) from one AWS Region to another?

I want to launch a copy of my Amazon Elastic Cloud Compute (Amazon EC2) instance to serve clients in other geographical regions and to create redundancy in my application. How do I create an Amazon Machine Image (AMI) of my Amazon EC2 instance and then copy the AMI to another AWS Region?ResolutionTo create a copy of your AMI in another AWS Region, follow these steps:Create an AMI of your EC2 instance:To create a Linux AMI, see Create your own AMI.To create a Windows AMI, see Create a custom Windows AMI.Copy the AMI of your EC2 instance to another AWS Region:To copy a Linux AMI, see Copy an AMI.To copy a Windows AMI, see Copy an AMI.After the copy operation completes, launch a new EC2 instance from your AMI in the new AWS Region.Copying an encrypted AMIFor more information, see the following:Copy an AMI - Encryption and copying.Share encrypted AMIs across accounts to launch instances in a single step.How to share encrypted AMIs across accounts to launch encrypted EC2 instances.Linux error message "This AMI was copied from an AMI with a kernel that is unavailable in the destination region: {Image ID}"Linux paravirtual (PV) AMIs aren't supported in all AWS Regions. If you receive this message, you can create a new HVM instance, and then attach new EBS volumes to the HVM instance. Then, copy over data from the EBS volumes attached to the old PV instance. For more information, see Linux AMI virtualization types.

Related informationBest practices for Amazon EC2How can I share an encrypted Amazon EBS volume with another AWS account?Amazon PV-GRUB Kernel Image IDs
Question: How do I automate the creation of AMIs based on my EBS-backed EC2 instance using Systems Manager Automation?

I want to automate the creation of Amazon Machine Images (AMIs) of Amazon Elastic Compute Cloud (Amazon EC2) instances that are backed by Amazon Elastic Block Store (EBS). How can I do this?Short descriptionYou can use AWS Systems Manager to create a maintenance window, and then register an Automation task to automate the creation of the AMIs. This process is applicable for both Windows and Linux instances.The instance that you want to create an AMI for must be listed as a managed instance in Systems Manager. First, verify that the instance meets all prerequisites for using Systems Manager. If the instance uses a private subnet, you can create VPC endpoints for Systems Manager.Note: (Windows only) Sysprep isn't run on Windows instances before creating an AMI when you use the following automation process.

ResolutionTo automate the creation of AMIs, follow these steps:Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent version of the AWS CLI.Create an AWS Identity and Access Management (IAM) role with permissions to create an AMI for the maintenance window. You can use the IAM console, AWS CLI, or Tools for Windows PowerShell.Create a maintenance window.On the Schedule section, for Specify with, choose Cron schedule builder.Assign targets to the maintenance window.Register an Automation task to create an AMI.For Actions, choose Register Automation task.For Automation document, choose AWS-CreateImage.For IAM service role, choose Use a custom service role, and then choose the IAM role that you created in step 1 of this article.On the Input parameters section, for InstanceId, enter the pseudo parameter placeholder {{TARGET_ID}} or {{RESOURCE_ID}}.Note: When entering the pseudo parameter placeholder, keep the following in mind:If the target type is RESOURCE_GROUP, the {{TARGET_ID}} parameter returns the full ARN of the resource. The {{RESOURCE_ID}} parameter returns a shorter name or ID of the resource.Examples{{TARGET_ID}} format: arn:aws:ec2:us-east-1:123456789012:instance/i-02573cafcfEXAMPLE{{RESOURCE_ID}} format: i-02573cafcfEXAMPLEIf the target type is INSTANCE, both the {{TARGET_ID}} and {{RESOURCE_ID}} parameters return the instance ID only.For more information on pseudo parameters, see About pseudo parameters.For a list of supported pseudo parameters, see Supported pseudo parameters.

Related informationWorking with maintenance windows (console)Systems Manager maintenance windows tutorials (AWS CLI)Create a standardized Amazon Machine Image (AMI) using SysprepHow can I restrict access to launch Amazon EC2 instances from only tagged AMIs?Controlling access during AWS requests
Question: How do I resolve "Net::OpenTimeout" errors in CodeDeploy?

I want to launch a Windows Amazon Machine Image (AMI) instance in AWS CodeDeploy. However, I receive the following error in my AWS CodeDeploy agent log file: "CodeDeploy Instance Agent Service: error during start or run: Net::OpenTimeout - execution expired - C:/Windows/TEMP/ocrFxxx.tmp/lib/ruby/2.3.0/net/http.rb:880:in 'initialize'."Short descriptionFor AWS provided Windows Server 2016 AMI instances, EC2Launch statistically sets the metadata or AWS Key Management Service (AWS KMS) routes on the first boot. If you create a custom AMI from these instances, then the routes are captured as part of the OS configuration. Any new instances that you launch from the AMI retain the same routes, regardless of subnet placement.When launching from a custom AMI, these static routes don't update unless one of the following configurations is true:You use Sysprep for your custom AMI.You schedule the Amazon Elastic Compute Cloud (Amazon EC2) launch initialization tasks before you create the AMI.When launching from a custom AMI into a different Amazon Virtual Private Cloud (Amazon VPC), subnet, or CIDR block, the following issues occur:Configured routes are no longer valid.The instance can't reach the metadata service or the AWS KMS servers that are required for instance activation.Resolution1.    Create a custom AMI in Windows.2.    Use the custom AMI that you created in step 1 to launch a new instance.Important: If you're using Sysprep, then use Sysprep after launching your new instance.3.    Connect to your launched Windows instance.4.    Log in to Windows PowerShell as an administrator.5.    In PowerShell, navigate to C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts. Then, enter the following command:.\InitializeInstance.ps1 -Schedule6.    Press Enter.7.    Terminate the instance that you created in step 3. Then, create a new AMI from the instance that you terminated.8.    Use the new AMI to launch the instance in CodeDeploy.
Question: How do I troubleshoot "Execution failed due to configuration error: Invalid endpoint address" errors from API Gateway?

I'm seeing "Execution failed due to configuration error: Invalid endpoint address" errors in my Amazon CloudWatch execution logs for Amazon API Gateway. What's causing the error, and how do I fix it?Short descriptionWhen communicating with backend HTTP or HTTPS endpoints, API Gateway uses the domain configured in the Endpoint URL value of the method request. Before sending a request to the endpoint URL, API Gateway resolves the domain by performing a Domain Name Server (DNS) resolution. If API Gateway can't resolve the domain in the endpoint URL, then the following error appears in the CloudWatch execution logs:Execution failed due to configuration error: Invalid endpoint address

ResolutionTo troubleshoot the error, do the following:1.    To confirm successful DNS resolution, run a name resolution command, such as dig or nslookup. If the DNS is resolved successfully, then the command response returns a valid, public IP address.Note: Use dig for Linux operating systems and nslookup for Windows operating systems, through the system's default command prompt.Example dig command:$ dig www.amazon.com; <<>> DiG 9.10.6 <<>> amazon.com;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13150;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0;; QUESTION SECTION:;www.amazon.com.    IN    A;; ANSWER SECTION:www.amazon.com.        41    IN    A    54.239.17.6;; Query time: 1 msec;; SERVER: 10.3.9.10#53(10.3.9.10);; MSG SIZE rcvd: 48Example nslookup command:$ nslookup amazon.comServer: 10.3.9.10Address: 10.3.9.10#53Name: amazon.comAddress: 54.239.25.1922.    If the command returns a private IP address within your Amazon Virtual Private Cloud (Amazon VPC), then set up an API private integration.  Note: API Gateway private integrations allow clients outside of your Amazon VPC to access your HTTP and HTTPs resources.-or-If the command doesn't return a valid, public IP address, then contact your DNS provider. Ask them to confirm that the DNS mappings for the domain are set up correctly.
Question: How can I generate a log bundle for my Amazon EKS instances?

I'm troubleshooting an Amazon Elastic Kubernetes Service (Amazon EKS) instance. I need to collect all the relevant Amazon EKS logs associated with that instance.

Short descriptionUse the AWSSupport-CollectEKSInstanceLogs automation document to collect your Amazon EKS logs.Important: For the automation to work, you must install and run the SSM Agent on your Amazon EKS instance.

ResolutionNote: The following resolution works only for worker nodes in Amazon EKS for Linux.1.    Open the AWS Systems Manager console.2.    In the navigation pane, choose Automation.3.    Choose Execute automation.4.    On the Owned by Amazon tab, in the Automation document search box, enter EKSInstanceLogs. Then, select the AWSSupport-CollectEKSInstanceLogs document.5.    Choose Next.6.    On the Automation Inputs page, for EKSInstanceId, enter your target Amazon EKS instance ID.7.    Set the LogDestination and AutomationAssumeRole parameters.Note: The log bundle is uploaded to the Amazon Simple Storage Service (Amazon S3) bucket that's specified in the LogDestination field. If you didn't specify a bucket, then you can retrieve the log bundle from the instance. The log bundle is saved locally in the /var/log/ path.8.    Choose Execute automation.When you run the above automation document, note the following best practices and requirements:It's a best practice to attach the Amazon managed AmazonSSMManagedInstanceCore policy to the relevant AWS Identity and Access Management (IAM) role. This IAM role is for the Amazon Elastic Compute Cloud (Amazon EC2) instance that's targeted for automation.If you provide the S3 bucket name in the LogDestination field before the automation runs, then the instance profile can write to the bucket.To run the automation and send the command to the instance, you must have at least the ssm:ExecuteAutomation and ssm:SendCommand permissions.To read the automation output, you must have the ssm:GetAutomationExecution permission.

Related informationConfigure instance permissions for Systems ManagerEKS Logs Collector (GitHub)
Question: I'm getting an error while using the password reset option in my Lightsail WordPress website's login page. How can I fix this?

When using the Lost Password option on the login page of my Amazon Lightsail WordPress website, I receive the error: "The email could not be sent. Your site may not be correctly configured to send email". I also can't send emails from my WordPress website using PHP mailer. How do I fix these issues?Short descriptionThe PHP mail function uses the sendmail application to send emails. PHP mailer and the Forgot Password option, which depends on PHP mailer, won't work in the following scenarios:The sendmail application isn't installed in the instance.The sendmail binary location isn't correctly configured in the PHP configuration file.Resolution1.    Verify that sendmail is installed by running the following command. If you receive the error command not found after running the command, then sendmail isn't installed.sudo /usr/sbin/sendmail -q2.    If sendmail isn't installed, then install it by running the following command:OS distributions such as Debian and Ubuntusudo apt-get install sendmailOS distributions such as Amazon Linux 2 and CentOSsudo yum install sendmail3.    Run the following command to configure PHP to use sendmail. This command modifies the PHP configuration file /opt/bitnami/php/etc/php.ini.sudo sed -i.$(date +%F_%R) '/sendmail_path/c\sendmail_path = "env -i /usr/sbin/sendmail -t -i"' /opt/bitnami/php/etc/php.ini4.    Run the following command to restart PHP-FPM:sudo /opt/bitnami/ctlscript.sh restart php-fpm5.    Use the password reset option on the log in page to verify that it now works.
Question: I tried to delete my ACM certificate but received an error that it's in use with other AWS resources

I want to delete an AWS Certificate Manager (ACM) certificate. However, I receive an error similar to "The certificate is in use (associated with other AWS resources) and cannot be deleted. Disassociate the certificate from each resource in the list and try again."Short descriptionDeploying an edge-optimized API endpoint creates an Amazon CloudFront distribution by Amazon API Gateway. Deploying a Regional API endpoint creates an Application Load Balancer by API Gateway. The CloudFront distribution or Application Load Balancer is owned by API Gateway, not your account. The ACM certificate provided to deploy API Gateway is associated with the CloudFront distribution or Application Load Balancer.Similarly, adding a custom domain to your Amazon Cognito user pool creates a CloudFront distribution. The CloudFront distribution is owned by the Amazon Cognito service, not by your account. The ACM certificate that's provided when you create the custom domain is associated with the CloudFront distribution.Defining a custom endpoint for your domain in Amazon OpenSearch Service creates an Application Load Balancer. The Application Load Balancer is owned by the OpenSearch Service, not by your account. The ACM certificate that's provided when you create the custom endpoint is associated with the Application Load Balancer.Note: You can check the resource that the ACM certificate is associated with by running the describe-certificate command with AWS Command Line Interface (AWS CLI).

ResolutionRemove the association of the ACM certificate with the CloudFront distribution or Application Load Balancer. To do this, you must replace the ACM certificate associated with the custom domain, or delete the custom domain.Important:Before you begin, be sure that you have installed and configured the AWS CLI.If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.To remove the association of the ACM certificate, do one of the following:To replace the ACM certificate for API Gateway, see Rotate a certificate imported into ACM.To replace the ACM certificate for Amazon Cognito, see Changing the SSL certificate for your custom domain.To delete the custom domain name for API Gateway, run the AWS command delete-domain-name.To delete the custom domain name for Amazon Cognito, run the AWS command delete-user-pool-domain.To update the ACM certificate for Amazon ES, see Creating a custom endpoint for Amazon OpenSearch Service.Then, delete the ACM certificate.

Related informationAPI Gateway problems
Question: How can I configure my IPv6 subnet as a private subnet?

I want to set up my Amazon Virtual Private Cloud (Amazon VPC) and configure my IPv6 subnet to be a private subnet.

Short descriptionIPv4-only VPCs can use private subnets if there is no route to the internet gateway in the associated route table. IPv4-only private subnets can also use NAT gateways to allow access from private AWS resources to the internet.In an Amazon VPC where IPv6 is activated, all the addresses associated with the instance are global unicast addresses. Therefore, they don't require a NAT gateway.Note: Amazon VPCs don't support Elastic IP addresses for IPv6.

ResolutionUse an egress-only internet gateway to allow your IPv6 address to access the internet, without internet resources initiating communication with your instance.1.    Create an egress-only internet gateway in your Amazon VPC.2.    Add a route to your route table that points all IPv6 traffic (::/0) or a specific range of IPv6 addresses to the egress-only internet gateway.After completing these steps, IPv6 traffic in the subnet that is associated with the route table is routed to the egress-only internet gateway.

Related informationDNS64 and NAT64VPC that supports IPv6 addressingCreate a dual-stack VPC and subnets using the AWS CLIVPC with public and private subnets (NAT)