botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the PutIntegration operation: The security token included in the request is invalid. #3576
Replies: 5 comments
-
Hi @farazsafari13 thanks for reaching out. The |
Beta Was this translation helpful? Give feedback.
-
On Fri, Feb 3, 2023 at 10:14 PM Tim Finnigan ***@***.***> wrote:
Hi @farazsafari13 <https://github.com/farazsafari13> thanks for reaching
out. The ...security token included in the request is invalid. can
indicate that there is an issue with your credentials. Can you confirm that
you are using the right profile? For reference here is the boto3
documentation on credentials:
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
.
—
Reply to this email directly, view it on GitHub
<#3576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQQYM5CJ5PUIMXZDYVHWWWTWVVGXFANCNFSM6AAAAAAUQB5MY4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
Hello dear thanks for reply yes im using right credentials because first
call on cloudformation returned response
|
Beta Was this translation helpful? Give feedback.
-
I am experiencing the exact same error as well. Credentials work perfectly for service 'dynamodb' but throw UnrecognizedClientException when attempting to create a 'apigateway' clent with credentials passed in via aws_access_key_id and Note that if these parameters are not passed in, ~/.aws/credentials file is read as expected and there is no issue. |
Beta Was this translation helpful? Give feedback.
-
Has anyone found a solution to this problem? Currently running into the same thing, trying to tag a Lambda function in another region than the home region from the executing Lambda function with boto3. |
Beta Was this translation helpful? Give feedback.
-
Same here. I am having the same issue. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to get some resourceId with:
session = boto3.Session(
region_name='us-east-1',
aws_access_key_id=aws_access_key,
aws_secret_access_key=aws_secret_key)
cloudformation = session.client('cloudformation', region_name='us-east-1')
resources_data = cloudformation.list_stack_resources(StackName=f"{microservice}")
After that I need to update integration requests of related api resourceId that i already retrieved like below:
apig = session.client( 'apigateway', region_name='us-east-1')
but i always get:
botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the PutIntegration operation: The security token included in the request is invalid.
i already tried create another session for apigateway resource,
set ~/.aws/credentials
export related variables
None of them work
for more information this python script will run in pipeline to update some properties
Beta Was this translation helpful? Give feedback.
All reactions