VishaalY/solutions-architect-hf-dataset huggingface dataset:
Question: How do I migrate from a NAT instance to a NAT gateway?

I need to migrate from a NAT instance to a NAT gateway, and I want the migration done with minimal downtime.

Short descriptionWhen creating a migration plan, consider the following:Do you plan to use the same Elastic IP address for the NAT gateway as currently used by the NAT instance? A new Elastic IP address might not be recognized by external clients.Is your NAT instance performing other functions, such as port forwarding, custom scripts, providing VPN services, or acting as bastion host? A NAT gateway allows instances in a private subnet to connect to the internet or other AWS services. Internet connections towards the NAT gateway are not allowed. It can’t be used for any other functions.Have you configured your NAT instance security groups and your NAT gateway network access control lists (network ACLs) appropriately? You can use security groups on the NAT instance and network ACLs on the NAT instance subnet to control traffic to and from the NAT subnet. You can only use a network ACL to control the traffic to and from the subnet in which the NAT gateway is located.Do your current NAT instances provide high availability across Availability Zones? If so, you might want to create a Multi-AZ architecture. You can do this by creating a NAT gateway in each Availability Zone. Next, configure your private subnet route-tables in a specific Availability Zone to use the NAT gateway from the same Availability Zone. Multi-AZ is useful if you want to avoid charges for inter-AZ traffic.Do you have tasks running through the NAT instance? When the routing is changed from the NAT instance, existing connections are dropped, and the connections must be reestablished.Does your architecture support testing the instance migrations individually? If so, migrate one NAT instance to a NAT gateway and check the connectivity before migrating other instances.Do you allow incoming traffic from ports 1024 - 65535 on the NAT instance's network ACL? You must allow traffic from ports 1024 - 65535 because the NAT gateway uses these as source ports. To learn more, see VPC with public and private subnets (NAT).

ResolutionDisassociate the Elastic IP address from the existing NAT instance.Create a NAT gateway in the public subnet for the NAT instance that you want to replace. You can do this with the disassociated Elastic IP address, or with a new Elastic IP address.Review the route tables that refer to the NAT instance or the elastic network interface of the NAT instance. Then edit the route to point to the newly created NAT gateway instead.Note: Repeat this process for every NAT instance and subnet that you want to migrate.Access one of the Amazon Elastic Compute Cloud (Amazon EC2) instances in the private subnet and verify connectivity to the internet.After you have successfully migrated to the NAT gateway and have verified connectivity, you can terminate the NAT instances.

Related informationCompare NAT gateways and NAT instancesMigrate from a NAT instance to a NAT gatewayNAT gatewaysHow do I set up a NAT gateway for a private subnet in Amazon VPC?Troubleshoot NAT gateways
Question: How do I configure GoSH on an Amazon RDS instance that is running MySQL?

I have an Amazon Relational Database Service (Amazon RDS) instance that is running MySQL. I want to turn on and configure Global Status History (GoSH) on my RDS DB instance. How can I do this?Short descriptionYou can use GoSH to maintain the history of different status variables in Amazon RDS for MySQL. First, you must turn on an event scheduler before you can use GoSH. Then, you can modify GoSH to run at specific intervals and to rotate tables regularly. By default, the GoSH information is collected every five minutes, stored in the mysql.rds_global_status_history table, and the table is rotated every seven days.Resolution1.    Modify the custom DB parameter group attached to the instance so that event_scheduler is set to ON.2.    Log in to your DB instance, and then run this command:SHOW PROCESSLIST;SHOW GLOBAL VARIABLES LIKE 'event_scheduler';3.    Turn on GoSH by running this command:CALL mysql.rds_enable_gsh_collector;4.    To modify the monitoring interval to one minute, run this command:CALL mysql.rds_set_gsh_collector(1);5.    Turn on rotation for the GoSH tables by running this command:CALL mysql.rds_enable_gsh_rotation;6.    Modify the rotation by running this command:CALL mysql.rds_set_gsh_rotation(5);Query the GoSH tables to fetch information about specific operations. For example, the following query provides details about the number of Data Manipulation Language (DML) operations performed on the instance every minute.SELECT collection_start, collection_end, sum(value) AS 'DML Queries Count' from (select collection_start, collection_end, "INSERTS" as "Operation", variable_Delta as "value" from mysql.rds_global_status_history  where variable_name = 'com_insert' union select collection_start, collection_end, "UPDATES" as "Operation", variable_Delta as "value" from mysql.rds_global_status_history  where variable_name = 'com_update' union select collection_start, collection_end, "DELETES" as "Operation", variable_Delta as "value" from mysql.rds_global_status_history  where variable_name = 'com_delete') a group by 1,2;Note: This query is not applicable for MySQL 8.0.

Related informationCommon DBA tasks for MySQL DB instancesManaging the global status history
Question: "After I use AWS Organizations to create a member account, how do I access that account?"

I used AWS Organizations to create a member account in my Organization, and I want to access that account.

Short descriptionWhen you create a member account with Organizations, you must specify an email address, an AWS Identity and Access Management (IAM) role, and an account name. If a role name isn't specified, then a default name is assigned: OrganizationAccountAccessRole. To switch to the IAM role and access the member account, use the Organizations console.

ResolutionIn the Organizations console, member accounts appear under the Accounts tab. Note the account number, email address, and IAM role name of the member account that you want to access. You can access the member account using either the IAM role or the AWS account root user credentials.Option one: Use the IAM Role1.    Open the AWS Management Console using IAM user credentials.2.    Choose your account name at the top of the page, and then select Switch role.Important: If you signed in with root user credentials, then you can't switch roles. You must sign in as an IAM user or role. For more information, see Switching to a role (console).3.    Enter the account number and role name for the member account.4.    (Optional) You can also enter a custom display name (maximum 64 characters) and a display color for the member account.5.    Choose Switch role.Option two: Use the root user credentialsWhen you create a new member account, Organizations sets an initial password for that account that can't be retrieved. To access the account as the root user for the first time, follow these instructions to reset the initial password:1.    Follow the instructions for Accessing a member account as the root user.2.    After you receive the reset password email, choose the Reset password link.3.    Open the AWS Management Console using the root user name and the new password.For more information, see How do I recover a lost or forgotten AWS password?Note: It's a best practice to use the root user only to create IAM users, groups, and roles. It's also a best practice to use multi-factor authentication for your root user.

Related informationAccessing and administering the member accounts in your organizationRemoving a member account from your organizationI can't assume a role
Question: How can I serve multiple domains from a CloudFront distribution over HTTPS?

I want to serve multiple domains from an Amazon CloudFront distribution over HTTPS.

ResolutionTo serve multiple domains from CloudFront over HTTPS, add the following values to your distribution settings:Enter all domain names in the Alternate Domain Names (CNAMEs) field. For example, to use the domain names example1.com and example2.com, enter both domain names in Alternate Domain Names (CNAMEs).Note: Choose Add item to add each domain name on a new line.Add your SSL certificate that covers all the domain names. You can add a certificate that's requested with AWS Certificate Manager (ACM). Or, you can add a certificate that's imported to either AWS Identity and Access Management (IAM) or ACM.Note: It's a best practice to import your certificate to ACM. However, you can also import your certificate in the IAM certificate store.For each the domain name, configure your DNS service so that the alternate domain names route traffic to the CloudFront domain name for your distribution. For example, configure example1.com and example2.com to route traffic to d111111abcdef8.cloudfront.net.Note: You can't use CloudFront to route to a specific origin based on the alternate domain name. CloudFront natively supports routing to a specific origin based only on the path pattern. However, you can use Lambda@Edge to route to an origin based on the Host header. For more information, see Dynamically route viewer requests to any origin using Lambda@Edge.

Related informationValues that you specify when you create or update a distributionUsing custom URLs by adding alternate domain names (CNAMEs)
Question: How do I share manual Amazon RDS DB snapshots or Aurora DB cluster snapshots with another AWS account?

I want to share manual Amazon Relational Database Service (Amazon RDS) DB snapshots or Amazon Aurora DB cluster snapshots with another account.

Short descriptionYou can share manual DB snapshots with up to 20 AWS accounts. You can start or stop sharing manual snapshots by using the Amazon RDS console, except for the following limitations:You can't share automated Amazon RDS snapshots with other AWS accounts. To share an automated snapshot, copy the snapshot to make a manual version, and then share that copy.You can't share manual snapshots of DB instances that use custom option groups with persistent or permanent options. For example, this includes Transparent Data Encryption (TDE) and time zone.You can share encrypted manual snapshots that don't use the default Amazon RDS encryption key. But you must first share the AWS Key Management Service (AWS KMS) key with the account that you want to share the snapshot with. To share the key with another account, share the AWS Identity and Access Management (IAM) policy with the primary and secondary accounts. You can't restore shared encrypted snapshots directly from the destination account. First, copy the snapshot to the destination account by using an AWS KMS key in the destination account. Then, restore the copied snapshot.To share snapshots that use the default AWS managed key for Amazon RDS (aws/rds), encrypt the snapshot by copying it with a customer managed key. Then, share the newly created snapshot.You can share snapshots across AWS Regions. First share the snapshot, and then copy the snapshot to the same Region in the destination account. Then, copy the snapshot to another Region.

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.Open the Amazon RDS console.In the navigation pane, choose Snapshots.Choose the DB snapshot that you want to copy.Choose Actions, and then choose Share Snapshot.Choose the DB snapshot visibility:Public allows all AWS accounts to restore a DB instance from your manual DB snapshot.Private allows only AWS accounts that you specify to restore a DB instance from your manual DB snapshot.In the AWS Account ID field, enter the ID of the AWS account that you want to permit to restore a DB instance from your manual DB snapshot. Then, choose Add.Note: You can repeat this step to share snapshots with up to 20 AWS accounts.Choose Save.To stop sharing a snapshot with an AWS Account, select the Delete check box next to the account ID from the Manage Snapshot Permissions pane.Choose Save.You can restore a DB instance or DB cluster from a shared snapshot by using the AWS CLI or Amazon RDS API. To do this, you must specify the full Amazon Resource Name (ARN) of the shared snapshot as the snapshot identifier.

Related informationSharing a DB snapshotCreating a DB snapshotRestoring from a DB snapshot
Question: Why is my AWS DMS task in an error status?

My AWS Database Migration Service (AWS DMS) task is in an error status. What does an error status mean, and how can I troubleshoot and resolve the error?Short descriptionAn AWS DMS task that is in an error status means that one or more of the tables in the task couldn't be migrated. A task in an Error status continues to load other tables from the selection rule, but a failed task stops with fatal errors.

ResolutionTo identify the table that has an error, open the AWS DMS console.Choose Database migration tasks from the navigation pane.In the Tables errored column, the number of tables that have errors are listed.Choose the name of the task that has an error status.From the Table statistics section, check the Load state column to see which table names have errors. Or you can run describe-table-statistics.To troubleshoot error messages further, turn on Amazon CloudWatch logging. If you haven't turned on logging, stop the task, and modify the task to turn on logging. Then, restart the task.From the Logs page for your task, filter the timestamps for events that have ]E: and ]W: in them.After you resolve the errors, reload the tables, or restart the task for to the error status to be resolved.

Related informationCommon errors for AWS DMSMigration strategy for relational databases
Question: Why isn’t my EBS volume increase reflected in my OS or Disk Management?

I increased the size of my Amazon Elastic Block Store (Amazon EBS) volume, but the change isn’t reflected in my operating system or Disk Management.

ResolutionModifying an EBS volume requires two steps. First, increase the size of the EBS volume using the Amazon Elastic Compute Cloud (Amazon EC2) console or the AWS Command Line Interface (AWS CLI). Then, extend the volume’s file system to use the new storage capacity. For instructions, see:Extend a Windows file system after resizing a volumeExtend a Linux file system after resizing a volumeNote: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.

Related informationRequirements when modifying volumesMonitor the progress of volume modificationsMap disks to volumes on your Windows instanceInitialize Amazon EBS volumes on LinuxInitialize Amazon EBS volumes on Windows
Question: How do I change the WorkSpace that I'm connecting to through the Amazon WorkSpaces client?

I want to change the WorkSpace that I connect to through the Amazon WorkSpaces client application. How can I do this?ResolutionTo change the WorkSpace that you connect to, follow these steps:Retrieve the user name and registration code for the new WorkSpace from your invitation email. If you haven't already completed the registration process by opening the link in your invitation email, then do so now. If you can't find your invitation email, ask your administrator to resend it.Note: All WorkSpaces that are launched from the same directory have the same registration code.Verify that you are using the latest Amazon WorkSpaces client. Then, open the client application.On the client login window, choose Change Registration Code. For more information, see WorkSpaces Windows client application or WorkSpaces macOS client application.The dropdown list displays all saved registration codes and the associated Region. You can select a different registration code from the list, or clear the text box and add a new registration code. Then, choose Continue.Sign in to the WorkSpace using the user name and password associated with the WorkSpace.To rename or remove a saved registration code, choose Settings, then choose Manage Login Information.

Related informationGet started with WorkSpaces Quick Setup
Question: Why was I charged by Amazon Web Services when I don't have an AWS account?

I received a bill for Amazon Web Services, but I don't have an AWS account. Why was I billed?ResolutionFirst, make sure that the charges were from Amazon Web Services.If your payment method is billed, then that payment method is associated with an AWS account with running resources. Here are some of the most common reasons why you might be billed for an account that you don't remember creating:Someone is using your payment method without your permission. If you're the individual owner of the payment method and don't have an AWS account, then someone might be using your payment information without permission. Speak with your credit card issuer to dispute the charges.Note: AWS Support can't resolve charges if you're not affiliated with an AWS account. For a stolen credit card or similar situation, contact your financial institution.A test account's Free Tier promotion expired. The AWS Free Tier covers new accounts for a year, allowing new customers to test many AWS services for free. Any resources left running after the Free Tier expires are billed at the On-Demand rates.You or another authorized user of the card might have forgotten that the account has running resources on it. For more information, see I unintentionally incurred charges while using the Free Tier. How do I make sure that I'm not billed again?Someone in your organization created the account. Check with other authorized users of the card to see if they've opened an AWS account using the card. This might be a spouse or another family member. If this is a corporate credit card, check with technical department heads within your organization. Common users of AWS include application or service developers, website designers, or systems administrators.A contractor or third party is using AWS to provide you a service. A contractor or third party that you hired might be building your website or app using AWS. Contact the third party for more details about these charges.If you need to contact AWS Support, use the I'm an AWS customer and I'm looking for billing or account support form. You can use this form to submit a case if you don't have an AWS account, or if you're unable to sign in. If you can't resolve your concern with the information provided, respond to the email you receive from AWS Support.Important: AWS Support can't discuss any account-related information if account security isn't verified.

Related informationI can't sign in because my credentials don't workAvoiding unexpected charges
Question: Why did the DeliveryFrequency of my AWS Config configuration snapshot change?

The deliveryFrequency of my AWS Config configuration snapshot changed, and there are PutDeliveryChannel events logged in AWS CloudTrail. However, I didn't change the AWS Config delivery channel. What caused this change?ResolutionThe frequency that AWS Config delivers configuration snapshots is controlled by:The deliveryFrequency parameter in the PutDeliveryChannel API using the AWS Command Line Interface (AWS CLI).The MaximumExecutionFrequency parameter in the PutConfigRule API set with creating or changing AWS Config periodic rules.Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.You might see PutDeliveryChannel events logged in CloudTrail if:The deliveryFrequency parameter isn't configured for the delivery channel.The value of the MaximumExecutionFrequency parameter is less than the deliveryFrequency value set on the delivery channel.If no value for the deliveryFrequency is set, then AWS Config calls the PutDeliveryChannel API to update the MaximumExecutionFrequency value for the periodic rule.You can view the deliveryFrequency using the DescribeDeliveryChannnels command similar to the following:$ aws configservice describe-delivery-channels --region your-region{    "DeliveryChannels": [        {            "configSnapshotDeliveryProperties": {                "deliveryFrequency": "Twelve_Hours"            },             "name": "default",             "s3BucketName": "config-bucket-123456789012-your-region"        }    ]}You can view the PutDeliveryChannel API using AWS CloudTrail similar to the following:"eventSource": "config.amazonaws.com",    "eventName": "PutDeliveryChannel",    "awsRegion": "your-region",    "sourceIPAddress": "192.0.2.0",    "userAgent": "console.amazonaws.com",    "requestParameters": {        "deliveryChannel": {            "name": "default",            "configSnapshotDeliveryProperties": {                "deliveryFrequency": "Twelve_Hours"            },            "s3BucketName": "config-bucket-123456789012-your-region"        }    },Related informationHow can I recreate an AWS Config delivery channel?
Question: How can I concatenate Parquet files in Amazon EMR?

I'm using S3DistCp (s3-dist-cp) to concatenate files in Apache Parquet format with the --groupBy and --targetSize options. The s3-dist-cp job completes without errors, but the generated Parquet files are broken. When I try to read the Parquet files in applications, I get an error message similar to the following:"Expected n values in column chunk at /path/to/concatenated/parquet/file offset m but got x values instead over y pages ending at file offset z"Short descriptionS3DistCp doesn't support concatenation for Parquet files. Use PySpark instead.

ResolutionYou can't specify the target file size in PySpark, but you can specify the number of partitions. Spark saves each partition to a separate output file. To estimate the number of partitions that you need, divide the size of the dataset by the target individual file size.1.    Create an Amazon EMR cluster with Apache Spark installed.2.    Specify how many executors you need. This depends on cluster capacity and dataset size. For more information, see Best practices for successfully managing memory for Apache Spark applications on Amazon EMR.$  pyspark --num-executors number_of_executors3.    Load the source Parquet files into a Spark DataFrame. This can be an Amazon Simple Storage Service (Amazon S3) path or an HDFS path. For example:df=sqlContext.read.parquet("s3://awsdoc-example-bucket/parquet-data/")HDFS:df=sqlContext.read.parquet("hdfs:///tmp/parquet-data/")4.    Repartition the DataFrame. In the following example, n is the number of partitions.df_output=df.coalesce(n)5.    Save the DataFrame to the destination. This can be an Amazon S3 path or an HDFS path. For example:df_output.write.parquet("URI:s3://awsdoc-example-bucket1/destination/")HDFS:df=sqlContext.write.parquet("hdfs:///tmp/destination/")6.    Verify how many files are now in the destination directory:hadoop fs -ls "URI:s3://awsdoc-example-bucket1/destination/ | wc -l"The total number of files should be the value of n from step 4, plus one. The Parquet output committer writes the extra file, called _SUCCESS.