31 questions
0 votes
1 answer
107 views
bash aws cloudshell for loop only returns the first item, then hangs [closed]
Pulling my hair out, looping over 100K S3 files in AWS Cloudshell; to copy in place to kick off a file processing lambda. when I run my for loop with an aws s3 cp on the dataset I want to, the for ...
0 votes
0 answers
98 views
IAM aws-cli commands having issues in gov?
I have an account in us-gov-west-1 region. Inside the AWS console cloudshell, I'm trying to run aws-cli commands. It looks like IAM calls fail, but others work. Every time I'm trying to run a IAM ...
0 votes
0 answers
564 views
Logout and delete cloudshell environment with a command line on the cli
When you open a terminal in AWS Console, called CloudShell, if you don't click on the actions button and click on Delete menu, that environment will be saved for some days. After those days you will ...
0 votes
1 answer
80 views
Use Cloudshell to get instances in specific AZ
I am trying to automate CloudWatch dashboard creation. As of right now, when I move from one account to another, I have to do some copy and replace of instance ID in order for the cloudshell command ...
0 votes
0 answers
60 views
aws scheduler get-schedule returning unusual ScheduleExpression
I'm using AWS CloudShell to retrieve the configuration of my AWS EventBridge Schedule but this is returning an unusual ScheduleExpression causing problems downstream. Commands I'm running in AWS ...
0 votes
3 answers
124 views
why is AWS saying my ARN is not valid with get-license-usage when it is fine with get-license-configuration
I'm trying to retrieve oracle license usage from license manager. If I do aws license-manager get-license-configuration --license-configuration-arn arn:aws:license-manager:eu-west-1:002909278xxx:...
0 votes
1 answer
887 views
How to fetch user's (my) public IP address inside AWS CloudShell?
I'm not looking for the public IP address of CloudShell; I know that I can find it out by hitting some external website. I would like to find out what my public IP address is when I'm connected to ...
0 votes
1 answer
3k views
Connecting to EC2 instance via CloudShell using its private IP
I am trying to connecting to an EC2 instance via CloudShell. When I use its public IPv4 DNS it works but when I use its private IP I get the following message: connect to host 172.xx.xx.xxx port 22: ...
1 vote
0 answers
579 views
Downloading aws cloudshell file to local windows machine
I tried to download cloudshell file to windows machine. But error showing 'Unable to download the file. Check the file name and path and try again.'. What is the right path I have to provide? Can ...
0 votes
1 answer
339 views
How can I add request header parameters in HTTP integration WebSocket api gateway AWS
I'm new to AWS. I want to add header parameters to my HTTP request. I tried the below command in CloudShell but it was not working. aws apigatewayv2 update-integration --integration-id xxx --api-id ...
0 votes
1 answer
2k views
AWSCloudShell - CDK Bootstrap failure with NodeJS version 16 EOL, how to upgrade?
I am following a tutorial on CDK using AWSCloudShell, and installed it using npm command: sudo npm install -g aws-cdk However, when I tried running the CDK command cdk bootstrap provides this error: ...
0 votes
1 answer
198 views
rename files with dates timestamp in aws cloudshell
i am trying to rename 100s of csv files that are in s3 bucket which has date part in it and struggling with code. s3://inventoryfiles/warehouse/2020/jan/inv12_20200301_220145.csv s3://inventoryfiles/...
1 vote
0 answers
897 views
How to install postgres-client 'psql' in AWS CloudShell permanently
I have successfully installed postgresql-client 'psql' in the AWS CloudShell. When I close the instance and re-open it. The installation is not there, I am getting "-bash: psql: command not ...
0 votes
2 answers
337 views
How to get N files from S3 bucket ordered by max size and modified after certain date using CloudShell?
I tried to use this command: aws s3api list-objects-v2 --bucket BUCKETNAME --query 'Contents[?LastModified>=2022-12-28].Key && sort_by(Contents, &Size)[-5:]' And while it searches for 5 ...
1 vote
1 answer
941 views
Running multiple MSCK REPAIR TABLE statements in AWS Athena
So I'm trying to execute the following in AWS Athena which allows to run only one statement at a time: MSCK REPAIR TABLE some_database.some_table_001; MSCK REPAIR TABLE some_database.some_table_002; ...