VishaalY/solutions-architect-hf-dataset huggingface dataset:
Question: "After performing a large deletion operation in Amazon S3, the list command is unresponsive. How do I troubleshoot this?"

I've performed a large number of file deletions and I'm trying to run the list command on my Amazon Simple Storage Service (Amazon S3) bucket. However, the list command hangs and doesn't return any output. How do I resolve this?Short descriptionIf you attempted to perform a large number of file deletions and the ls or list-objects command hangs, try the following troubleshooting tips:Remove expired object delete markers.Try the list-objects-v2 command or the latest version of the AWS Command Line Interface (AWS CLI).Use an Amazon S3 inventory report.

ResolutionRemove expired object delete markersIn a versioning-enabled bucket, when a delete operation is made for a versioned object (without specifying a version ID), then a delete marker is created. When previous object versions are set to expire using lifecycle configuration rules, delete markers that are associated with the expired objects are in the bucket.If there are thousands of delete markers, the list operation might timeout. Therefore, it's a best practice to remove the expired object delete markers from the bucket to improve the performance of a list operation.You can use a lifecycle rule to clean up expired object delete markers:1.    Open the Amazon S3 console.2.    From the list of buckets, choose the bucket that has the expired object delete markers.3.    Choose the Management tab.4.    Choose Add lifecycle rule and enter a rule name. Then, choose Next.5.    For Storage class transition, you can skip this section by choosing Next.6.    For Configure expiration, select Clean up expired object delete markers. Then, choose Next.7.    Review the lifecycle rule settings, and then choose Save.Try the list-objects-v2 command or the latest version of the AWS CLIThe list-objects-v2 command (or ListObjectsV2 API call) is an updated version of the list operation that includes some performance improvements. The following example command requests a list of objects in awsexamplebucket:aws s3api list-objects-v2 --bucket awsexamplebucketAdditionally, confirm that you're using the latest version of the AWS CLI. Earlier AWS CLI versions might still be using previous ListObjects API call.Note: For backward compatibility, Amazon S3 continues to support the ListObjects API call.Use an Amazon S3 inventory reportInstead of running a list operation, you can use an Amazon S3 inventory report to get a list of your objects. When a bucket has hundreds of millions of objects, running multiple list operations (listing 1,000 objects at a time) can be challenging.You can get daily or weekly Amazon S3 inventory reports for a bucket or prefix, and you can include additional object metadata in your reports. Additionally, you can pass an inventory report as an input for a batch operation, and you can use Amazon Athena to query a report.

Related informationAmazon S3 pricing
Question: "When I print from a Windows WorkSpace to a local printer, why do I experience document formatting or printer feature issues?"

When I print to my local printer from an Amazon WorkSpaces Windows WorkSpace, the document formatting is incorrect, or some printer features don’t work. How can I fix this?ResolutionWhen you print from a WorkSpace, issues with document formatting or specific printer features might be due to one of the following:Mismatched printer driversAdvanced remote printing isn’t enabled by a Group PolicyTo fix these issues, follow these steps:1.    Verify that the most recent version of the Amazon WorkSpaces client is installed on the host computer.2.    Confirm that an Amazon WorkSpaces Group Policy that enables basic and advanced remote printing is installed in your domain.3.    Run a Group Policy update using the following PowerShell command:gpupdate /force4.    Verify that the most recent printer driver is installed from the manufacturer’s website on both the local host and within the Windows WorkSpace. Run the following Windows PowerShell command to check the driver versions on both devices:Get-PrinterDriver5.    Reboot the WorkSpace.

Related informationPrinting from a WorkSpace
Question: How I delete an AWS key for a root user?

I want to delete the AWS access key for a root user.

ResolutionImportant: Be sure to check that the access key is no longer in use before you delete it. You can't recover an access key after you delete it. Any users or applications that are using the access key won't be able to programmatically access your account and resources after you delete the key.To delete access keys for the AWS account root user, do the following:Sign in to the AWS Identity and Access Management (IAM) console as the AWS account root user.Choose your account name on the navigation bar, and then choose Security credentials.If you see a warning about accessing the security credentials, choose Continue to security credentials.Expand the Access keys (access key ID and secret access key) section.Choose Delete next to the access key that you want to delete.In the confirmation box, choose Deactivate.To confirm deletion, enter the access key ID that you want to delete in the text input field.In the confirmation box, choose Delete.For more information, see AWS security credentials.For instructions on deleting access keys for an AWS Identity and Access Management (IAM) user, see Managing access keys (console).

Related informationBest practices for AWS accountsAWS Security Blog
Question: How do I resolve HTTP 5xx errors in Amazon DynamoDB?

When I work with items in an Amazon DynamoDB table, I get a HTTP 5xx error similar to the following: "Internal server error (Service: AmazonDynamoDBv2; Status Code: 500; Error Code: InternalServerError".

ResolutionA 5xx error indicates a problem that must be resolved by AWS. This might be a transient issue, such as a network outage or backend hardware failure. To mitigate 5xx errors, do the following:Implement a retry strategy for requests that fail with a 5xx error code. All AWS SDKs have a built-in retry mechanism with an algorithm that uses exponential backoff. You can modify the retry parameters to suit your needs. For more information, see Error retries and exponential backoff.Avoid strongly consistent reads. When there's a network delay or outage, strongly consistent reads are more likely to fail with a 500 error. For more information, see Read consistency.If you continue to get 5xx errors, open AWS Service Health Dashboard to check if there are any operational issues with the service.

Related informationHTTP status code 5xx
Question: Why does swapping occur in ElastiCache?

I am seeing an increase in Swap activity in my Amazon ElastiCache instances? How do I resolve this?Short descriptionElastiCache runs on Linux Operating System (OS). Swap behavior is controlled by the OS and is influenced by factors such as OS version or activity patterns. It's expected behavior that instances experience fluctuations in swap usage.Swapping issues occur when there isn't enough available Random Access Memory (RAM) when the system is moving pages between the disk and RAM.Linux OS proactively relocates memory pages to swap for two main reasons:An ElastiCache node is under memory pressureLinux swaps infrequently accessed memory to disk

ResolutionAn ElastiCache node is under memory pressureIf your cache node uses more memory than the instance has available, then Linux swaps data from the memory to disk to free up memory space for use. A FreeableMemory CloudWatch metric equal to zero or a SwapUsage metric that is greater than the FreeableMemory metric indicates a node that is under memory pressure.Because both Redis and Memcached are in memory caches, swapping slows down your application.If you see that a node is swapping due to memory pressure, scale up to a larger cache node type. Otherwise, set a Reserved Memory parameter for Redis, or a connection overhead parameter for Memcached.Linux swaps infrequently accessed memory to diskSwap might be used when an ElastiCache node isn't under memory pressure because Linux OS proactively moves memory pages that aren't frequently used to swap to increase memory efficiency. This usage is normal kernel behavior and doesn't imply active reading and writing to swap.It's a best practice to review the SwapUsage metric to verify that the amount of swap used doesn't exceed 300 MB.

Related informationWhich metrics should I monitor? (Redis)Which metrics should I monitor? (Memcached)
Question: How can I troubleshoot 403 "missing authentication token" errors when invoking API Gateway REST or HTTP APIs with a custom domain name?

I followed the instructions to set up a custom domain name for my Amazon API Gateway REST or HTTP API. I am getting a 403 "Missing Authentication token" error when I invoke the API. How can I troubleshoot and resolve this error?Short descriptionAPI Gateway APIs with custom domain names return the 403 "Missing Authentication token" error when invoking the API if the URL path is incorrect.Note: Using the API Gateway API stage URL won't return the 403 "Missing Authentication token" error.

ResolutionCustom domain names configured for API Gateway APIs use API mappings to connect API stages to send traffic to APIs through the custom domain name. API mappings have an API, stage, custom domain name, and optionally a path to use for the mapping. For more information, see Working with API mappings.In the following example, the custom domain "https://api.example.com" API mapping is configured as follows:APIExampleStagePathDefault URLCustom Domain URLabcd3456efAPI 1dev(none)https://abcd3456ef.execute-api.us-east-1.amazonaws.com/devhttps://api.example.comwxyz1234abAPI 2testordershttps://wxyz1234ab.execute-api.us-east-1.amazonaws.com/testhttps://api.example.com/ordersmnop5678qrAPI 3prodcustomershttps://mnop5678qr.execute-api.us-east-1.amazonaws.com/prodhttps://api.example.com/customersIn this example configuration, a request made to API 1 using the URL https://abcd3456ef.execute-api.us-east-1.amazonaws.com/dev/resourceA routes traffic to "resourceA" successfully. This is because the request is made to the resource for the stage name "dev". However, the same request using the URL https://api.example.com/dev/resourceA returns a 403 "Missing Authentication token" error. This error occurs because the stage "dev" is mapped to the (none) path of the custom domain name. To route requests to "resourceA" using the custom domain name, make sure that the URL is https://api.example.com/resourceA.Similarly, the custom domain name URL equivalent to https://wxyz1234ab.execute-api.us-east-1.amazonaws.com/test/resourceB is https://api.example.com/orders/resourceB. This is because the "test" stage of API 2 is mapped to the path "orders" in the custom domain API mapping.

Related informationHow do I troubleshoot HTTP 403 errors from API Gateway?How do I troubleshoot API Gateway REST API endpoint 403 "Missing Authentication Token" errors?Setting up a Regional custom domain name in API Gateway
Question: Why can't I connect to an endpoint service from my interface endpoint in an Amazon VPC?

I can't connect to an endpoint service from my Amazon Virtual Private Cloud (Amazon VPC) interface endpoint using AWS PrivateLink. How do I determine what's preventing me from making this connection?ResolutionCheck the following settings to troubleshoot connectivity problems between an interface VPC endpoint and an endpoint service.Endpoint connection stateThe endpoint connection must be in the Available state. If the endpoint connection is in the Pending or Rejected state, then any connection sent to the Network Load Balancer from the interface endpoint times out.To resolve this issue, you might need to do one of the following tasks:Grant a service consumer the permissions to create an interface endpoint to the service.Request that the endpoint service provider accepts the endpoint connection request to activate the connection. By default, connection requests must be manually accepted. However, the service provider can configure acceptance settings so that any connection requests are automatically accepted.Network Load Balancer responseYou can simulate the request from an instance in the same VPC as the Network Load Balancer. If you don't get the expected response, then troubleshoot your Network Load Balancer.Network Load Balancer listener portBe sure that the interface VPC endpoint is sending traffic to the correct listener port of the Network Load Balancer. For example, you might have a Network Load Balancer with a listener configured on port 80. If the client sends traffic on port 443, the client might receive the error Connection refused.Zonal DNS nameIf the client is using a zonal DNS name for the interface VPC endpoint, then verify that the zone is responsive on the service provider's end. It's a best practice to use the Regional DNS name to verify that requests are sent to healthy zones.Security group and network access control rulesCheck the security group and network access control (ACL) rules on both the service consumer and service provider's end. Be sure to allow traffic to and from the endpoint service.

Related informationHow do I troubleshoot Amazon EC2 instance connection timeout errors from the internet?
Question: How do I cancel my AWS Support plan?

I want to cancel my Developer or Business Support plan.

ResolutionTo cancel your AWS Support plan, sign in to your AWS account as the root user. You can also use an AWS Identity and Access Management (IAM) user with access permissions for AWS Support Plans. For more information, see Manage access for AWS Support Plans.The Basic Support plan is the standard Support plan. This plan is free with all AWS accounts.To cancel a Developer or Business Support plan, switch your account back to the Basic Support plan by following these steps:Open the AWS Support Center. Or, in the AWS Management Console, choose the question mark icon, and then choose Support Center.In the navigation pane, choose Change next to your current AWS Support plan.Choose Review downgrade for the Basic Support plan.Important: If you have an Enterprise On-Ramp or Enterprise Support plan, then on the Change plan confirmation dialog box, choose Contact us. Next, fill in the form, and then choose Submit.For Change plan confirmation, expand the support items to see the features included with the plan.Choose Accept and agree.You'll receive a prorated refund for the remainder of your current month's AWS Support charge to the original payment method. This prorated refund is subject to your AWS Support plan's minimum monthly charge.If you have the Basic Support plan, you can't cancel it. To close your AWS account, see How do I close my AWS account?Related informationAWS Support
Question: Why aren't Amazon S3 object-level API actions appearing in my CloudTrail Event history?

I activated AWS CloudTrail object-level event logging for an Amazon Simple Storage Service (Amazon S3) bucket. Why aren't Amazon S3 object-level API actions appearing in my CloudTrail Event history?Short descriptionAmazon S3 object-level API actions are CloudTrail data events. By default, trails don't log data events, and data events aren't viewable in CloudTrail Event history.To view Amazon S3 object-level API actions after you've activated data event logging, you must query your CloudTrail logs.To query CloudTrail logs for object-level API actions, you can use either of the following AWS services and features:Amazon CloudWatch logs filter patternsAmazon Athena queriesFor more information, see Logging Amazon S3 API calls using AWS CloudTrail.Note: If you have other data sources configured for the same S3 bucket as your trail, then the logs are combined with CloudTrail events.

ResolutionTo use CloudWatch logs filter patterns to view object-level API actionsFollow the instructions in Search log data using filter patterns.Example CloudWatch Logs filter syntax for the DeleteBucket API action{$.eventName = "DeleteBucket"}To use Athena queries to view object-level API actionsNote: To use Athena to query CloudTrail logs, you must have a trail configured to log to an Amazon S3 bucket. You can use Athena to query CloudTrail logs over the last 90 days.Follow the instructions in How do I automatically create tables in Amazon Athena to search through AWS CloudTrail logs?Example query for the GetBucketAcl API actionNote: Replace example-cloudtrail-log with your CloudTrail log's name.SELECT *FROM example-cloudtrail-logWHERE eventname = 'GetBucketAcl';For more information, see Understanding CloudTrail logs and Athena tables.

Related informationCloudTrail tracking with Amazon S3 SOAP API callsHow do I analyze my Amazon S3 server access logs using Athena?Analyze security, compliance, and operational activity using AWS CloudTrail and Amazon Athena
Question: How do I import existing resources into a nested stack whose parent is the root stack in CloudFormation?

I have a nested stack in AWS CloudFormation whose parent stack is a root stack. I want to import an existing resource into the nested stack. But when I try to import the resource in the root stack, I get the error “This template does not include any resources to import.”Short descriptionWhen the nested stack's parent stack is the root, it's a best practice to modify only the root stack.Note: The following resolution is for importing a resource into a nested stack whose parent stack is the root stack.Important: Always run drift detection on stacks after an import operation to verify that the imported resource isn't drifted.

ResolutionTo import resources into a nested stack, follow these steps:Update the root template with a Retain DeletionPolicy on the nested AWS::CloudFormation::Stack resource to detach the stack from the root stack without deleting it.Update the root stack by removing AWS::CloudFormation::Stack from the template.Note: After you update the root stack, the nested stack is still marked as Nested.Perform an import operation on the detached nested stack to import the existing resource.Note: Because the stack is still considered Nested, a warning appears that recommends you to update the root stack instead. Ignore it and continue to update the nested stack. Don't modify any other resources during the import.Move the detached nested stack out of IMPORT_COMPLETE status by updating it again with an easily removable change, such as adding outputs or tags.Perform an import operation on the root stack to add the nested stack back into its nested hierarchy.Note: Make sure that the root template includes a reference for the nested stack's updated template so that it contains the newly imported resource.

Related informationCloudFormation Workshop: Nested stacks lab
Question: How do I optimize the performance of my Amazon EBS volumes?

I want to make sure that I get optimal performance from my Amazon Elastic Block Store (Amazon EBS) volumes.

ResolutionMake sure that your Amazon Elastic Compute Cloud (Amazon EC2) instance is a type that can be optimized for use with Amazon EBS. An EBS-optimized EC2 instance provides dedicated network throughput for volumes. For a description of the instance types, see Amazon EBS-optimized instances - Supported instance types.Improve the performance of Amazon EBS volumes by doing the following:For best practices and performance tuning, see Amazon EBS volume performance on Linux instances.Initialize EBS volumes restored from a snapshot before you use them.Use AWS Trusted Advisor to get a list of best practices that you can use to improve the performance of your Amazon EBS volumes.

Related informationAmazon Elastic Block Store (Amazon EBS)Amazon EBS-optimized instances
Question: How do I create an AppStream 2.0 image for Windows and deploy it to my fleet?

I want to create an Amazon AppStream 2.0 image, and then deploy the image to my fleet.

ResolutionTo create an AppStream 2.0 image and deploy the image to your fleet, follow these steps:Launch an image builder from the AppStream 2.0 console.Create a custom image with the image builder.Launch a fleet. For Choose an Image, choose your custom image.Create a stack. From the Create Stack wizard, for Fleet, select your new fleet.Create a user, and then assign the user to a stack. You can provide access to users through the AppStream 2.0 user pool, SAML 2.0, or the AppStream 2.0 API. For more information, see User pool administration and Amazon AppStream 2.0 Integration with SAML 2.0.Note: If you use a fleet that's joined to an Active Directory domain, you must use SAML.

Related informationWhat is Amazon AppStream 2.0?Amazon AppStream 2.0 resources
Question: Can I increase the IAM role chaining session duration limit?

I used the AssumeRole API to assume an AWS Identity and Access Management (IAM) role using temporary credentials, but I received an error similar to the following:"The requested DurationSeconds exceeds the 1 hour session limit for roles assumed by role chaining".

Short descriptionYou can use role chaining to assume a role with temporary security credentials using the AWS Command Line Interface (AWS CLI). For more information, see the role chaining section in roles terms and concepts.Note: Role chaining limits your AWS CLI or AWS API role session to a maximum of one hour and can't be increased. For more information, see Roles terms and concepts.

ResolutionUse the following best practices with role chaining:Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.The operation fails if the DurationSeconds parameter value for the temporary credentials is greater than one hour.The role chaining one hour limit only applies to the AWS CLI or API.The AWS Management Console doesn't support role chaining. You can use the switch role feature in the Console to get a role's temporary credentials. The Console uses the credentials of the IAM or federated user to switch to another role. For more information, see switching to a role (console).Multi-Factor Authentication (MFA) users with the AWS CLI use temporary credentials to assume another role. The temporary credentials use the AWS STS GetSessionToken API and are limited to one hour.If role chaining is used to assume Role B for the same AWS account as Role A, then assign additional permissions to Role A to avoid role chaining into Role B.

Related informationTroubleshooting IAM and Amazon Elastic Compute Cloud (Amazon EC2)