1 Answer
- Newest
- Most votes
- Most comments
0
sample code
sudo -u ec2-user whoami
I referred to the following sites
https://stackoverflow.com/questions/57443700/running-command-in-userdata-as-a-not-root-user https://zenn.dev/nnnto/articles/df29c8d03e1c45
answered 3 years ago
Relevant content
- asked 7 months ago
- asked 5 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 6 months ago