#awscli — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #awscli, aggregated by home.social.
-
So sánh hiệu suất đồng bộ hóa file nhỏ lên S3: rclone (39s), mc (4.5ph), aws-cli (6ph), duck (2ph). Với hàng trăm nghìn file nhỏ, rclone vượt trội. Với file lớn, mc nhanh hơn. Kết luận: dùng rclone cho file nhỏ, mc cho file lớn và xóa. #rclone #minio #awscli #duck #S3 #performance #rclone #minio #S3 #hiệusuất #lưutrữ #đồngthời
-
Master AWS CLI Multi-Profiles in 2025
Learn to streamline multi-account AWS access using .bashrc, direnv, AssumeRole, and MFA.
Boost security, reduce errors, and automate like a real DevOps engineer.🔗 Full guide:
https://medium.com/@ismailkovvuru/master-aws-cli-multi-profiles-bashrc-direnv-assumerole-mfa-2025-guide-1cc165eff351 -
AWS 提供 Console-to-Code 功能
這個是在 Reddit 上看到的:「Convert AWS console actions to reusable code with AWS Console-to-Code, now generally available (aws.amazon.com)」,原文在「Convert AWS console actions to reusable code w
#AWS #Cloud #Computer #Murmuring #Network #Programming #Service #amazon #aws #awscli #cloud #code #console #gcp #google #platform #script #service #shell #to #web
-
Today I wasted about an hour attempting to fix a bug I had fixed once before. The lovely folks at #Microsoft decided to make #Powershell output files in the encoding UTF16 LE BOM. Very future-proof. Unfortunately, the excellent programmers at #AWS created their #awscli to read UTF8 sans BOM. If you forget about that difference, the AWS CLI will insist that you gave it invalid files to parse. And you can waste hours trying to figure out what's wrong. Remember to convert the encoding. #protip
-
Retrieve secrets from #AWS Secrets Manager by version #awscli
https://www.geekyhacker.com/retrieve-secrets-from-aws-secrets-manager-by-version/ -
pretty happy w/this shell oneliner to get the deets on the unique kms keys used in the last 100k decryptions
aws cloudtrail lookup-events --lookup-attributes "AttributeKey=EventName,AttributeValue=Decrypt" --region us-east-1 --max-results 100000 | jq -r '.Events[].CloudTrailEvent' | jq -r | grep '"ARN"' | sed 's!.*key/!!;s!"!!' | sort -u | xargs -n1 aws kms describe-key --key-id | grep -i 'keyid\|creation\|manager\|descr' | sed 's!.*"\(.*\)":!\1!;s!",!"!;s!KeyId!\n\nKeyId!'
#unix #shell #aws #awscli #bash #commandline #unixmagic #commandlineexcellence #oneliner #1liner
-
So, #AWS #cloudformation vs #AWSCLI. Looks to be ending up the same as Azure #ARM vs #AzureCLI. If you already have the template, and deploy it once, it is good. But developing CLI scripts is quicker (debug one step at a time, rather than all at once). And templates run into the same dead ends: e.g. decides it needs to recreate the entire subnet, so it attempts to, but runs into an IP address conflict with the existing one, and the whole thing stops. There are things/changes that declarative approaches just can't do, and you need to use migrations (CLI scripts).
-
I'm a few months late noticing, but I'm glad to see that the aws-cli has added the ability to display the current credentials, or credentials for a specific config profile.
aws configure export-credentials
Using options, the results can be formatted as environment variables for eval and use by other tools.
I think this is especially useful if the config profile assumes a (cross-account) role, or you are using `aws sso login`.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/export-credentials.html
-
AWS CLI: Create CloudFront Invalidation
https://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-invalidation.html
-
Bonus:
Allow defaults for the parameter values in the config file, as in:
role_arn=arn:aws:iam::{{acct=123456789012}}:role/{{role=readonly}}
-
I want to be able to set up an aws-cli config profile that includes parameter substitutions, and then specify the values for those parameters with command line options.
The command line could be:
aws s3 ls \
--profile assumewithmfa \
--param acct=123456789012 \
--param role=s3-readonlyand the config:
[profile assumewithmfa]
source_profile=user-main
role_arn = arn:aws:iam::{{acct}}:role/{{role}}
mfa_serial=arn:aws:iam::987654321098:mfa/user
region=us-east-1 -
@raoul
`aws s3 sync` is built on boto, but adds extra logic like adding in a content-type attribute, which is critical for static website hosting in S3.I had this all working on my python2.6 AWS Lambda function which team for years, but when I upgraded to Python 3.9 it broke calling the `aws` included in the ZIP file.
I may be able to figure out how to fix it, but was hoping the intervening years had brought about a more standard aws-cli in Lambda.
-
I'm working to upgrade some old AWS Lambda functions, and have a question:
Does the AWS Lambda environment for Python 3.9 include the aws-cli anywhere?
If not, are there any modern instructions on the best way to include the aws-cli in a Lambda function?
I'm hoping the word "layer" is not in the answer, but I'll look at that if I must.
-
#TIL: if you install the latest #awscli in a #linux distro, the executable is not called #aws, but "aws2". And thanks.
#TodayILearned