Github actions: Self learning

First of all we have github and AWS account

Need to have a workflow as a main.yml file to integrate github to do the CI/CD workflow

So Github will now be required to communicate with AWS account so we pass AWS credentials in Github workflow

How Git and AWS can be integrated (Github actions needs to talk with AWS)?

In AWS go to IAM, for a particular user performing the activity, create a key value pair secret access

Now, for a particular repo for which we want to perform github actions, Go to github actions settings, there we have secrets, configure those credentials from AWS here

Now whatever we configure in settings will be taken as a parameter to the main.yml file and thus actions will be performed

Here is the main.yml:

Make static website option enabled

we get 404 error through the S3 bucket access link...

so After this, we got the code in the S3 bucket, to host this application through internet we have to allow public read access for the S3 bucket

{

"Version": "2012-10-17",

"Statement": [ {

"Sid": "PublicReadGetObject",

"Effect": "Allow", "Principal": "*",

"Action": "s3:GetObject",

"Resource": "arn:aws:s3:::tws-portfolio-rock/" } ]

}

after this we can see website running trhough the link we get in s3