After run script on amazon linux 2023 and setup IAM role for instance.
I can see serverless --version and can write sls.
I can see aws sts get-caller-identity
But when I create project and sls deploy it will have to Login/Register that I don’t want
Yes, it’s vanish.
I don’t want sls login directly but I want to use Serverless Access Key. When I create sample project on EC2 and try run it shows. sls deploy --help
Serverless Framework V4 CLI is free for developers and organizations making less than $2 million annually, but requires an account or a license key.
Please login/register or enter your license key: ·
So how is that EC2 provisioned ? It seems like there may be some other process or people involved we don’t know about ?
Do you need to use this EC2 for some reason ? Like is this running in a CodePipeline action?
Actually, I’m just an intern. My senior asked me to prepare a machine to run the code from Jenkins on the EC2 machine. He asked me to find a way to deploy without use sls login and use only IAM role and Serverless Access key for deploy. I create my own Ec2 on my own account that have IAM policy equal admin. Sorry, there’s something I really don’t know.
Finally, I got the answer. I don’t know why save in ~/.profile not work but in ~/.bashrc works! Thank you for suggest me. It helps a lot. Sorry for reply late cause I have a lot thing to do When running my t2.micro EC2 it should had to waited 9 mins for save serverless_key to bashrc