How to change User Status FORCE_CHANGE_PASSWORD?

This has finally been added to AWSCLI: https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/admin-set-user-password.html You can change a user’s password and update status using: aws cognito-idp admin-set-user-password \ –user-pool-id <your-user-pool-id> \ –username <username> \ –password <password> \ –permanent Before using this, you may need to update your AWS CLI using: pip3 install awscli –upgrade

How to use multiple AWS accounts from the command line?

You can work with two accounts by creating two profiles on the aws command line. It will prompt you for your AWS Access Key ID, AWS Secret Access Key and desired region, so have them ready. Examples: $ aws configure –profile account1 $ aws configure –profile account2 You can then switch between the accounts by … Read more

How can I use wildcards to `cp` a group of files with the AWS CLI

To download multiple files from an aws bucket to your current directory, you can use recursive, exclude, and include flags. The order of the parameters matters. Example command: aws s3 cp s3://data/ . –recursive –exclude “*” –include “2016-08*” For more info on how to use these filters: http://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters

How to test credentials for AWS Command Line Tools

Use GetCallerIdentity: aws sts get-caller-identity Unlike other API/CLI calls it will always work, regardless of your IAM permissions. You will get output in the following format: { “Account”: “123456789012”, “UserId”: “AR#####:#####”, “Arn”: “arn:aws:sts::123456789012:assumed-role/role-name/role-session-name” } Exact ARN format will depend on the type of credentials, but often includes the name of the (human) user. It uses … Read more

Downloading an entire S3 bucket?

AWS CLI See the “AWS CLI Command Reference” for more information. AWS recently released their Command Line Tools, which work much like boto and can be installed using sudo easy_install awscli or sudo pip install awscli Once installed, you can then simply run: aws s3 sync s3://<source_bucket> <local_destination> For example: aws s3 sync s3://mybucket . … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)