No credentials set for components during deploy
Description
After a few months I didn't deploy anything and updated to the latest version (3.7.1) I cannot able to deploy any components due an AWS SDK authentication error.
Every component seems to be unable to authenticate, in my .env I set AWS_PROFILE but didn't works:
AWS_PROFILE=myprofile
Tried to set the environment variable before deploy command, unfortunately same result:
AWS_PROFILE=myprofile serverless deploy --debug
Using AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in .env results in a warning message:
Error: Using local credentials is no longer supported. Please link a provider to a service or set a default provider on the dashboard by visiting this URL:
I follow the instruction, deployed the CloudFormation Stack, setup the "default" provider for my org, set the SERVERLESS_ACCESS_KEY (already set in previous tests) and tried to re-deploy but it still doesn't solve.
For every tests I used a modified component in "dev" version with some debug log and a STS GetCallerIdentity API call that returns a different account number that mine:
Account: 486128539022
Arn: arn:aws:sts::486128539022:assumed-role/sp-registry-component-lambda-role-prod-serverlessinc/...
also this.credentials in Serverless Component is an empty object, therefore seems no authentication is performed or the role set by the provider is not assumed correctly.
I've no errors or warning during deploy, even using the "--debug" flag.
Maybe I've just misunderstood the new documentation about credentials, however, it seems strange to me that none of the configurations I have tried are not working.
Additional Data
Framework Core: 2.26.0
Plugin: 4.4.3
SDK: 2.3.2
Components: 3.7.1
@daaru00 I'm unable to reproduce this. Which component are you using? It seems from what you're describing that you're running your own component? could you provide more context here?