4,494 questions
0
votes
0
answers
52
views
How to force refresh of AWS SSO loging "refresh"?
I use metaflow with S3. In order to access S3, I need to login with AWS CLI single sign on (aws sso login). The problem is that I have no way to force "refresh" (not sure about correct ...
0
votes
1
answer
63
views
AWS CLI remove object for specific folder range name
Currently I am able to remove objects under 1 folder WO123456 using single AWS CLI line.
aws s3 rm "s3://<bucket-name>/WO123456/" --recursive --profile <profile-name>
How can I ...
0
votes
1
answer
112
views
How to develop and test AWS Lambda written in Go locally without SAM?
I tried to run an AWS Lambda written in Go locally. I used function handlers in Go and did this:
Initialized a project with go mod init aws-example-go
Created the file main.go and copy pasted the ...
0
votes
1
answer
110
views
S3 signed link expiration differs with ruby sdk and aws cli -- the cli is apparently not subject to session expiration?
I'm running on an amazon linux instance which has been granted an instance profile, to a iam role with a maximum session duration of 12 hours. According to the documentation, I shouldn't be able to ...
0
votes
1
answer
177
views
How do you use aws cli --query to filter items using JMESPath functions?
I've been reading the documentation at https://docs.aws.amazon.com/cli/v1/userguide/cli-usage-filter.html and https://jmespath.org/specification.html but it doesn't work.
For example, I want to use ...
0
votes
1
answer
86
views
Multiple AWS cli profiles active at once
I have configured two distinct AWS cli profiles inside ~/.aws/credentials mentioning in the two profiles two different couples of:
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
With profile 1 I can access a ...
0
votes
1
answer
148
views
AWS Credentials not loading for one user in Java
Our team has created a Java command-line utility that connects to AWS S3. We aren't specifying a particular credentials source, we're just using S3Client.builder().region(region).build() and allowing ...
1
vote
1
answer
181
views
Querying INTELLIGENT_TIERING AWS S3 objects for actual tier status?
Is there a way to get more granularity about the status of an object in an AWS S3 bucket, which is in the INTELLIGENT_TIERING storage class?
Specifically, I would like to use a command-line query to ...
0
votes
1
answer
59
views
AWS CLI error with delete objects recursively using include, exclude
I have various sub-directories inside my s3 bucket which contain 2 files, namely:
pavement_suitability_final_result.gpkg
Intermediate_Part1_output.gpkg
I wish to delete only the files named as ...
3
votes
1
answer
214
views
Access denied to AWS Secrets Manager API for BatchGetSecretValue, while GetSecretValue works
I have configured an AWS IAM policy to allow all access to secretsmanager on all resources:
{
"Version": "2012-10-17",
"Statement": [
{
"...
0
votes
0
answers
24
views
How do I use a regex for user-name in aws iam cli?
I want to use a regex for username "prod-customer-1-user"/"prod-customer-2-user"/... in attach-user-policy iam cli command. I can't quite figure out how. What's the correct ...
-1
votes
1
answer
112
views
How do I handle dependency projects whith .Net8 AOT Publish to AWS Lambda? MSB4018 error
How can i deploy my .Net 8 AOT AWS Lambda project when the project has a dependency?
aws-extensions-for-dotnet-cli discussions:
https://github.com/aws/aws-extensions-for-dotnet-cli/discussions/364
...
0
votes
0
answers
80
views
Using AWS SSO credentials with YACE
After adding YetAnotherCloudwatchExporter(YACE) to my Prometheus server & configuring AWS CLI to use my provided SSO profile, I'm getting the errors below when running YACE. I've already confirmed ...
0
votes
0
answers
82
views
AWS CLI : How to get the VPC_LINK associated to an API Resource
I need to run a query to establish which VPC_LINK (id or name) that each of our API Resources are associated with .. We have hundreds of API's defined, each with multiple resources, and I need to ...
0
votes
0
answers
73
views
Syncing AWS Buckets without overwriting contents
We are using a s3 bucket as a shared server for assets for a creative team. We are migrating to a new bucket and would like to move over folders. The new bucket is already in use.
Is there a way to ...
0
votes
0
answers
120
views
Error Updating a lambda function off of a versioned .zip object in S3
I am encountering a challenge within our production pipeline related to the handling of the lambda.zip file. Specifically, this file is being transferred from a temporary S3 bucket to a permanent S3 ...
0
votes
0
answers
83
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
252
views
how to get cluster certificate authority and JWT token after assuming different aws account
Hello this is my code below, I'm basically trying to assume role into different aws account and get the list of clusters using aws cli command, later update kubeconfig based on the cluster name ...
0
votes
1
answer
76
views
aws s3 sync exit code 1 on gitlab-ci
on gitlab-ci I run aws s3 sync $BUCKET_IN $BUCKET_OUT_DATED --storage-class GLACIER --region=eu-west-1 --quiet --delete
and I have this error wihtout other informations:
Cleaning up project directory ...
0
votes
0
answers
67
views
How to invoke AWS Lambda through service layer in .NET API project and deploy via AWS CLI
I have an ASP.NET Core Web API project and a separate service layer that contains business logic. I want to invoke an AWS Lambda function from my service layer (not directly from the API), and handle ...
1
vote
3
answers
4k
views
AWS CLI copy local file to S3 cloud giving errors
I am trying to sync a local directory to an S3 bucket and the set commands are taking me in an erroneous circle.
(I've scrubbed the personal directory and bucket names)
Command for the simple sync ...
0
votes
0
answers
205
views
aws appconfig create-hosted-configuration-version
I have tried to use the StackOverflow answer in how to create hosted configuration version for aws appconfig to create a --content payload.
This results in An error occurred (BadRequestException) ...
0
votes
0
answers
68
views
How do I get logs for a particular lambda execution using AWS CLI?
Using aws stepfunctions get-execution-history, I can see all the events in a particular execution. It lists, among other things, lambda function executions. How do I get the logs associated with a ...
0
votes
0
answers
187
views
Unable to query AWS via steampipe after SSO login - Error refreshing cached SSO token
note: sensitive info redacted
I was using steampipe successfully the day before. Today, I receive an error that I'm unable to refresh cached credentials.
steampipe query "select organization_id ...
-1
votes
1
answer
63
views
aws route53domains delete-domain --domain-name <xyz.co.uk>
I registered a .co.uk domain but then cancelled it using Nominet. The domain is now is unregistered and available. However, it still shows in Route 53 Registered domains. When I try to delete it using ...
0
votes
1
answer
426
views
How to tag Images output by AWS Image Builder Pipeline to include the Image in a Lifecycle Policy
The AWS Image Builder Lifecycle will automatically deprecate, disable and delete Images and their associated AMIs and Snapshots based on a set of rules. This keeps the list of available images current ...
0
votes
1
answer
51
views
How can I run an AWS CLI query on AWS CloudFronts with a certain comment?
I want to run the following AWS CLI command inside a Jenkins pipeline script to get all our CloudFronts.
$ aws cloudfront list-distributions
{
"DistributionList" : {
"Items":...
0
votes
1
answer
71
views
Why does my AWS CodeBuild project fail to create a CloudFormation stack with the error "Template file not found"?
I am working on automating the deployment of a static website using AWS CodePipeline and CodeBuild, along with CloudFormation. However, I am encountering some issues in my buildspec.yml configuration.
...
0
votes
0
answers
184
views
cdk diff does not output with color
I have been struggling with color outputs a lot in GitHub Actions. ANSI color is supported, but many CLI tools only output in color if an interactive TTY is detected. I'm guessing because of this ...
0
votes
2
answers
438
views
aws cli v2 not signing s3 payload
I am using aws cli v2 to upload a file to s3:
aws s3 cp local_file s3://bucket
and I do have below configuration:
[default]
s3 =
payload_signing_enabled = true
The debug message shows:
x-amz-...
0
votes
0
answers
248
views
/__e/node20/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__e/node20/bin/node)
I have a github action (someone else made it, and pretty sure it works in the past)
jobs:
# some other job/steps...
upload-binary-to-s3:
if: startsWith(github.ref_name, 'xx-vault-plugin_')
...
1
vote
3
answers
85
views
Pipe commands not getting killed after head exits
So, I'm not sure if the commands are actually important, but for background this is the command I was running:
aws s3 ls s3://REDACTED/ | jq -nR '[inputs | split(" +"; null).[3]] | reverse.[]...
0
votes
1
answer
214
views
Kubernetes Cronjob execution on specific node
I’m working on a setup where I need to run a specific container via a Kubernetes CronJob on a specific node. The workflow involves:
1️⃣ Launching a new node just before the CronJob execution.
2️⃣ ...
0
votes
1
answer
136
views
How to associate a Trust store to an ALB with AWS CLI
In the context of configuring mTLS above ALBs, I need to automate the configuration with AWS CLI.
I know how to check if a Trust store is associated with an ALB with the describe-trust-store-...
-1
votes
1
answer
41
views
How can I perform a hierarchical query with the AWS CLI for specific tags and output the result in a flat structure?
With the following query:
aws fsx describe-file-systems \
--no-paginate --no-cli-pager --output yaml \
--query 'FileSystems[].{id:FileSystemId,netid:NetworkInterfaceIds[0],name:Tags[?Key==`Name`]....
-1
votes
1
answer
55
views
Is there a way to drop file extensions when using AWS CLI with --recursive?
I am trying to recursively upload parquet files to an AWS S3 bucket using AWS CLI. I want to drop the .parquet and use the file name as the target table name.
So in a directory of table1.parquet, ...
1
vote
1
answer
210
views
How to escape backslash and quotes in powershell for aws-cli
Hi I'm working in a windows powershell script:
$startDate = "2024-11-07T11:00:00Z"
$endDate = "2024-11-07T11:40:00Z"
$startTimestamp = [int]([DateTimeOffset]::Parse($startDate)....
1
vote
1
answer
189
views
Run dynamodb describe table for all tables in the account
I am trying a small shell script to describe all the dynamodb tables in my aws account.
#!/bin/bash
# Get the list of DynamoDB table names
ddbtables=$(aws dynamodb list-tables | jq '.[]' | tr -d \&...
-1
votes
1
answer
469
views
CDK Diff Fails with "Need to perform AWS calls, but no credentials have been configured" Despite Correct Role Assumption Setup
I'm trying to deploy a CDK stack using npx cdk diff with credentials managed by 1Password. I need to assume a specific AWS role (admin@ontology-dev) to perform the deployment, but I keep encountering ...
0
votes
1
answer
913
views
403 Forbidden Error When Attempting to Log In to Amazon ECR Public Using AWS CLI
I’m trying to log in to Amazon ECR Public to push Docker images from the AWS CLI on an EC2 instance (Ohio region, us-east-2). I've configured my credentials with full access to ECR and followed the ...
1
vote
1
answer
67
views
Member must satisfy regular expression pattern: .*
I'm creating a new ElasticSearch/OpenSearch domain from the AWS CLI with an access policy defined in shell variable with an open access policy but it fails.
ACCESS_POLICY_JSON=$(cat <<EOF
{
&...
5
votes
2
answers
588
views
Invalid FilterExpression: Attribute name is a reserved keyword; reserved keyword: type
I have a DynamoDB table with some string datatype attributes (sample below). I use the AWS CLI to download this data in my local Mac.
I want to scan/query the DynamoDB table and download all the ...
0
votes
1
answer
55
views
how to use s3api to find N largest files of specific StorageClass
This query returns the 5 largest items, but ignores the StorageClass
aws s3api list-objects-v2 --bucket spinhead --query 'Contents[?StorageClass==STANDARD] && sort_by(Contents, &Size)[-5:]'...
-3
votes
1
answer
4k
views
How to switch profiles with aws configure sso without having to clear browser cache [closed]
These are the steps I need to currently follow in order to switch profiles with aws configure sso from my terminal to use aws cli commands without credentials missing error:
Set default browser to ...
0
votes
2
answers
210
views
Powershell Script to Automate the Install of AWS CLI and copy s3 uploaded file to the windows server
I have developed a script that will download and install the AWS CLI and Config with .env file. Even though it is installed and configured successfully, when I'm trying to copy the s3 file to the ...
2
votes
1
answer
72
views
The provided project resource is not valid on "aws devicefarm create-test-grid-url" for Mobile device testing project
My goal is to start testing my website in real mobile device browsers from Amazon Device Farm. So, I need a "command_executor" for Appium web driver. I have a Mobile device testing project ...
0
votes
1
answer
159
views
How to use the latest platform version automatically for AWS Elastic Beanstalk in GitHub Actions?
I have a GitHub Actions workflow for deploying my Node.js app to AWS Elastic Beanstalk. Here's the relevant part of my YAML file for this deployment:
- name: Install awsebcli
uses: sparkplug-app/...
-1
votes
1
answer
218
views
aws sidecar container for sync s3 bucket to nginx is outputing 1000s of logs and stopping and starting
I have set up a task definition to run an nginx ecs container. Tested and works.
I have added a sidecar container to share a volume with the nginx container, so it can upload content to the container ...
0
votes
0
answers
59
views
How to convert AWS CLI string array into a bash array efficiently [duplicate]
This is an example AWS CLI script:
taskDefs=$(aws ecs list-task-definitions --status="INACTIVE" --query="taskDefinitionArns")
echo $taskDefs
# output: ["arn:1", "arn:...
0
votes
1
answer
96
views
AWS CLI to get all matching CloudFronts using the "--query" option?
I use the AWS list-distributions CLI command to get all the ClodFronts in our system. For example
$ aws cloudfront list-distributions
{
"DistributionList": {
"Items": [
...