1 Answer
- Newest
- Most votes
- Most comments
2
Hello.
Judging from the error message, there seems to be a problem with the IAM configured in Lightsail.
What IAM policy do you have in place for Lightsail?
In the case of Lightsail, you cannot set an IAM role directly, so you need to set an access key from an IAM user.
Try setting this access key to the OS root user.
I think the IAM policy used by Lightsail can be the one described in the AWS blog below.
https://aws.amazon.com/jp/blogs/compute/using-aws-codedeploy-and-aws-codepipeline-to-deploy-applications-to-amazon-lightsail/
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:Get*",
"s3:List*"
],
"Resource": "arn:aws:s3:::<S3 Bucket Name>/*"
}
]
}
Relevant content
- asked 8 months ago
- Accepted Answerasked a year ago
- asked a year ago
- asked 4 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 15 days ago
- AWS OFFICIALUpdated 4 months ago
Thanks for stopping by. I actually did set the access-key & secret-key on the LightSail OS in '/etc/codedeploy-agent/conf/codedeploy.onpremises.yml" alongside the iam_user_arn and region. I also confirmed the arn_user had the s3 full access, CodeDeploy full access and all. Still not working.
Please try restarting the Codedeploy Agent as per the stackoverflow answer below. Also, if you have set authentication information other than "codedeploy.onpremises.yml", try deleting it. https://stackoverflow.com/questions/37721601/aws-code-deploy-deployment-failed