after reading the steps make sure you do the following:
- Create a repo (which you did) and from your local prompt, run
git clone https: //git-codecommit.<REGION>.amazonaws.com/v1/repos/wildrydes-site. Make sure you specify the correct region if you created a CodeCommit repo. The result of that command will be an empty repository.
- Do cd wildrydes-site from your local prompt.
- From within your local folder, execute this command
aws s3 cp s3://wildrydes-<REGION>/WebApplication/1_StaticWebHosting/website ./ --recursive. This command is saying "copy recursively all files and folders contained in the public S3 bucket named wildrydes-<REGION> into my local folder". Choose you region, run it and the result will be that now you should have those files locally to your wildrydes-site folder (but not committed yet).
- To commit and push those files remotely, from local prompt, run
git add .,
git commit -m 'new'and
git push. This will push the result to your remote repository (CodeCommit or Github).
Hope it helps, and if it does, I 'd appreciate if answer can be accepted ;)
- asked a year ago
- asked 3 months ago
- How do I allow API Gateway REST API users to run Lambda using the execution role from an Amazon Cognito user pool group?AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
@alatech: Thanks for response. I did till cd wildrydes-site but when i give aws s3 cp s3://wildrydes-<REGION>/WebApplication/1_StaticWebHosting/website ./ --recursive. Its giving me error: monic@DESKTOP-8FGFDOS MINGW64 ~/wildrydes-site (master) $ aws s3 cp s3://wildrydes-us-west-2/WebApplication/1_StaticWebHosting/website Note: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run:
aws help aws <command> help aws <command> <subcommand> help aws: error: the following arguments are required: paths
Also,what content should i keep in index.html file that i have to upload in S3?
Hi would first suggest to update your AWS CLI. You can follow this guide: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config and/or https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html. Assuming you have correctly installed CLI, make sure you copy the whole command: aws s3 cp s3://wildrydes-us-west-2/WebApplication/1_StaticWebHosting/website ./ --recursive , as it seems your command stops at "/website" wording. Let me know.
@alatech : git add . , git commit -m 'new' and git push worked... Now what content i can put in index.html file?
Well, assuming you ran “ aws s3 cp s3://wildrydes-us-west-2/WebApplication/1_StaticWebHosting/website ./ --recursive” and then the 3 commands you said above, then you code commit or GitHub repository should have a bunch of html/JS/css files. Can you verify that they have been pushed to the repository remotely (either going to GitHub page or code commit in the console)?
It worked. Thanks.