1 Answer
- Newest
- Most votes
- Most comments
1
Hello.
You may have already checked this, but is there an IAM policy set up in your IAM role that also allows "lambda:InvokeFunction"?
https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html?utm_source
Starting in October 2025, new function URLs will require both lambda:InvokeFunctionUrl and lambda:InvokeFunction permissions.
If "lambda:InvokeFunctionUrl" and "lambda:InvokeFunction" are permitted in the IAM policy and the Lambda resource-based policy, then I believe it can also be used with IAM roles.
CREDS=$(aws sts assume-role \
--role-arn arn:aws:iam::123456789012:role/testRole \
--role-session-name test)
export AWS_ACCESS_KEY_ID=$(echo "$CREDS" | jq -r '.Credentials.AccessKeyId')
export AWS_SECRET_ACCESS_KEY=$(echo "$CREDS" | jq -r '.Credentials.SecretAccessKey')
export AWS_SESSION_TOKEN=$(echo "$CREDS" | jq -r '.Credentials.SessionToken')
export AWS_DEFAULT_REGION=us-east-1
curl --aws-sigv4 "aws:amz:us-east-1:lambda" \
--user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \
-H "x-amz-security-token: $AWS_SESSION_TOKEN" \
https://xxxxx.lambda-url.us-east-1.on.aws/
Relevant content
asked 2 years ago
asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 days ago
