- Newest
- Most votes
- Most comments
I recommend you to use AWS CodePipeline ( a service similar to Jenkins), which cost $1 monthly per active pipeline.
In theory, with CodePipeline you don't need CodeCommit you can use S3 as source.
Ideally you should only checkin your source code, then use CodeBuild to build an artifact (WAR for example).
However if you decide to directly push WAR for now, S3 might be a better choice.
After Checkin / upload to S3, the CodePipeline can be configured to either going through a build process (in case of a source file) or directly deploy and configure the artifact to target environment (EC2 or otherwise) through a deployment provider, such as CodeDeploy.
Thanks @Jason -
Edited this after more reading and understanding ... The basic flow works like this and this is my current status;
- code is pushed (I am testing with 2 files, the WAR and the appspec.yaml file). From the CLI;
aws deploy push —application-name name —description “iniital test” —ignore-hidden-files —s3-location s3://bucket/folder/myapp.zip —source .
After that, I had the single file in that S3 bucket myapp.zip.
Npw step 2 is to use codedeploy (or another method) to get that down to the server. I like CodeDeploy as I can do a one at a time (not sure if I can with pipeline), but from the console, when I tried, it just kept spinning. I had the code-deploy agent installed (manually from an earlier test), so removed it and said allow SSM to install. That machine should have the permissions via IAM-Roles. But after the timeout, the error is "CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server."
However code-deploy is not running, so I assume its an issue with SSM permissions not being allowed to run there? So, I can continue this, OR as you suggested code pipeline (if it can do the same one at a time), however the bigger picture is the apppec file as that has the where to put and what commands to run after.
Remember this is a single file and source control is not needed as we keep the olders in a sub folder, so really would be perfect if he dropped a file in a folder (new), something like codepipeline fired, which put the file in the right place and ran the scripts to do (which are on an EFS). So I was even looking at eventbridge, but really need that one at a time feature.
Thank you again.
Relevant content
- asked 10 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago