Big Sur sam cli 1.15.0 credentials issue
See original GitHub issueDescription:
Erroneous error on sam local invoke running aws-sam-cli version 1.15.0 on Mac OS Big Sur (11.1). Every invoke produces the same error. If I run aws-sam-cli version 1.12.0 I do not get the following error message.
The security token included in the request is invalid
Steps to reproduce:
Mac OS Big Sur (11.1)
sam version 1.15.0
sam local invoke [FunctionName]
require 'aws-sdk-dynamodb'
def lambda_handler(event:, context:)
dynamodb = Aws::DynamoDB::Client.new()
resp = dynamodb.list_tables()
p resp['table_names']
end
Observed result:
2020-12-30 13:18:38,776 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2020-12-30 13:18:38,777 | local invoke command is called
2020-12-30 13:18:38,824 | No Parameters detected in the template
2020-12-30 13:18:38,862 | 15 resources found in the template
2020-12-30 13:18:38,862 | Found Serverless function with name='GetCampsiteProfileFunction' and CodeUri='campers/'
2020-12-30 13:18:38,862 | Found Serverless function with name='PopulateUserFunction' and CodeUri='campers/'
2020-12-30 13:18:38,862 | Found Serverless function with name='EmbedDomainsPipelineFunction' and CodeUri='campers/'
2020-12-30 13:18:38,863 | Found Serverless function with name='GetCamperLinksFunction' and CodeUri='campers/'
2020-12-30 13:18:38,863 | Found Serverless function with name='PutCamperLinksFunction' and CodeUri='campers/'
2020-12-30 13:18:38,863 | Found Serverless function with name='GetOgMetadataFunction' and CodeUri='paint/'
2020-12-30 13:18:38,863 | Found Serverless function with name='GetTablesFunction' and CodeUri='paint/'
2020-12-30 13:18:38,863 | Found Serverless function with name='PainterFunction' and CodeUri='paint/'
2020-12-30 13:18:38,863 | Found Serverless function with name='GoogleAnalyticsFunction' and CodeUri='apis/'
2020-12-30 13:18:38,863 | Found Serverless function with name='intercomFunction' and CodeUri='apis/'
2020-12-30 13:18:38,863 | Found Serverless function with name='PuppeteerFunction' and CodeUri='puppeteer/'
2020-12-30 13:18:38,863 | Found Serverless function with name='FeaturesReportFunction' and CodeUri='reports/'
2020-12-30 13:18:38,863 | Found Serverless function with name='WallpaperGeneratorFunction' and CodeUri='wallpaper/'
2020-12-30 13:18:38,871 | Found one Lambda function with name 'GetTablesFunction'
2020-12-30 13:18:38,871 | Invoking table_names.lambda_handler (ruby2.5)
2020-12-30 13:18:38,872 | No environment variables found for function 'GetTablesFunction'
2020-12-30 13:18:38,872 | Environment variables overrides data is standard format
2020-12-30 13:18:38,872 | Loading AWS credentials from session with profile 'None'
2020-12-30 13:18:38,882 | Resolving code path. Cwd=/Users/josh/Documents/repos/Summer-Camp, CodeUri=paint/
2020-12-30 13:18:38,882 | Resolved absolute path to code is /Users/josh/Documents/repos/Summer-Camp/paint
2020-12-30 13:18:38,883 | Code /Users/josh/Documents/repos/Summer-Camp/paint is not a zip/jar file
2020-12-30 13:18:38,904 | Skip pulling image and use local one: amazon/aws-sam-cli-emulation-image-ruby2.5:rapid-1.15.0.
2020-12-30 13:18:38,904 | Mounting /Users/josh/Documents/repos/Summer-Camp/paint as /var/task:ro,delegated inside runtime container
2020-12-30 13:18:39,327 | Starting a timer for 30 seconds for function 'GetTablesFunction'
START RequestId: fa5300d3-15d0-4de0-8b4b-88a6145dee5e Version: $LATEST
Error raised from handler method
{
"errorMessage": "The security token included in the request is invalid",
"errorType": "Function<Aws::DynamoDB::Errors::UnrecognizedClientException>",
"stackTrace": [
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/seahorse/client/plugins/raise_response_errors.rb:17:in `call'",
"/var/runtime/gems/aws-sdk-dynamodb-1.58.0/lib/aws-sdk-dynamodb/plugins/simple_attributes.rb:119:in `call'",
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:22:in `call'",
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/aws-sdk-core/plugins/idempotency_token.rb:19:in `call'",
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/aws-sdk-core/plugins/param_converter.rb:26:in `call'",
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/seahorse/client/plugins/request_callback.rb:71:in `call'",
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/aws-sdk-core/plugins/response_paging.rb:12:in `call'",
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/seahorse/client/plugins/response_target.rb:24:in `call'",
"/var/runtime/gems/aws-sdk-core-3.110.0/lib/seahorse/client/request.rb:72:in `send_request'",
"/var/runtime/gems/aws-sdk-dynamodb-1.58.0/lib/aws-sdk-dynamodb/client.rb:3602:in `list_tables'",
"/var/task/table_names.rb:8:in `lambda_handler'"
]
}
END RequestId: fa5300d3-15d0-4de0-8b4b-88a6145dee5e
REPORT RequestId: fa5300d3-15d0-4de0-8b4b-88a6145dee5e Init Duration: 0.63 ms Duration: 1180.16 ms Billed Duration: 1200 ms Memory Size: 128 MBMax Memory Used: 128 MB
Expected result:
2020-12-30 13:21:33,312 | Telemetry endpoint configured to be https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2020-12-30 13:21:33,406 | local invoke command is called
2020-12-30 13:21:33,440 | No Parameters detected in the template
2020-12-30 13:21:33,473 | 15 resources found in the template
2020-12-30 13:21:33,473 | Found Serverless function with name='GetCampsiteProfileFunction' and CodeUri='campers/'
2020-12-30 13:21:33,473 | Found Serverless function with name='PopulateUserFunction' and CodeUri='campers/'
2020-12-30 13:21:33,473 | Found Serverless function with name='EmbedDomainsPipelineFunction' and CodeUri='campers/'
2020-12-30 13:21:33,473 | Found Serverless function with name='GetCamperLinksFunction' and CodeUri='campers/'
2020-12-30 13:21:33,473 | Found Serverless function with name='PutCamperLinksFunction' and CodeUri='campers/'
2020-12-30 13:21:33,473 | Found Serverless function with name='GetOgMetadataFunction' and CodeUri='paint/'
2020-12-30 13:21:33,473 | Found Serverless function with name='GetTablesFunction' and CodeUri='paint/'
2020-12-30 13:21:33,473 | Found Serverless function with name='PainterFunction' and CodeUri='paint/'
2020-12-30 13:21:33,473 | Found Serverless function with name='GoogleAnalyticsFunction' and CodeUri='apis/'
2020-12-30 13:21:33,473 | Found Serverless function with name='intercomFunction' and CodeUri='apis/'
2020-12-30 13:21:33,474 | Found Serverless function with name='PuppeteerFunction' and CodeUri='puppeteer/'
2020-12-30 13:21:33,474 | Found Serverless function with name='FeaturesReportFunction' and CodeUri='reports/'
2020-12-30 13:21:33,474 | Found Serverless function with name='WallpaperGeneratorFunction' and CodeUri='wallpaper/'
2020-12-30 13:21:33,491 | Found one Lambda function with name 'GetTablesFunction'
2020-12-30 13:21:33,492 | Invoking table_names.lambda_handler (ruby2.5)
2020-12-30 13:21:33,492 | No environment variables found for function 'GetTablesFunction'
2020-12-30 13:21:33,492 | Environment variables overrides data is standard format
2020-12-30 13:21:33,492 | Loading AWS credentials from session with profile 'None'
2020-12-30 13:21:33,503 | Resolving code path. Cwd=/Users/josh/Documents/repos/Summer-Camp, CodeUri=paint/
2020-12-30 13:21:33,503 | Resolved absolute path to code is /Users/josh/Documents/repos/Summer-Camp/paint
2020-12-30 13:21:33,503 | Code /Users/josh/Documents/repos/Summer-Camp/paint is not a zip/jar file
2020-12-30 13:21:33,516 | Skip pulling image and use local one: amazon/aws-sam-cli-emulation-image-ruby2.5:rapid-1.12.0.
2020-12-30 13:21:33,517 | Mounting /Users/josh/Documents/repos/Summer-Camp/paint as /var/task:ro,delegated inside runtime container
2020-12-30 13:21:33,867 | Starting a timer for 30 seconds for function 'GetTablesFunction'
START RequestId: 38cff02c-ab65-1710-0145-ca8e0692bed2 Version: $LATEST
["cash"]
END RequestId: 38cff02c-ab65-1710-0145-ca8e0692bed2
REPORT RequestId: 38cff02c-ab65-1710-0145-ca8e0692bed2 Init Duration: 675.20 ms Duration: 464.97 ms Billed Duration: 500 ms Memory Size: 128 MBMax Memory Used: 38 MB
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Mac
- OS: 11.1
sam --version
: 1.15.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Installing the AWS SAM CLI - AWS Serverless Application Model
This section describes how to install the AWS SAM CLI on macOS, Windows, and Linux.
Read more >homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter
aacgain 1.8 AAC‑supporting version of mp3gain
aalib 1.4rc5 Portable ASCII art graphics library
aamath 0.3 Renders mathematical expressions as ASCII art
Read more >Security Bulletin 02 Nov 2022
CVE Number Base Score Reference
CVE‑2021‑32679 8.8 https://nvd.nist.gov/vuln/detail/CVE‑2021‑32679
CVE‑2021‑32688 8.8 https://nvd.nist.gov/vuln/detail/CVE‑2021‑32688
CVE‑2021‑32765 8.8 https://nvd.nist.gov/vuln/detail/CVE‑2021‑32765
Read more >Why does AWS SAM CLI 1.33.0 crash with _regex.cpython-38 ...
We have identified the issue and a fix is on the way. The issue is a version of regex. We need to pin...
Read more >Tutorial: Deploying a Hello World application - 亚马逊云科技
This means that you have not set up Amazon credentials to enable the Amazon SAM CLI to make Amazon service calls. To fix...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks @joshwerner … I am able to reproduce the issue.
Could you please retry again, and do not forget to update the AWS profile (name it default, or you need to add --profile <profile name> to local invoke command)