1

(Lowly dev trying to play at devops)

I've successfully created an EC2 instance on an Amazon Linux platform.

I have a .net 6 API running locally, with the code base sitting in a private GitHub repo.

I have been through dozens of pages of setup instructions just trying to figure out how to deploy this application. There is no way that deploying one application to a server is this complex, but every AWS document on the matter branches out into 6 other ones.

None of it actually makes any sense to me, so when something goes wrong I don't even know where I am.

I'm thinking this is a code -> server -> run situation.

So far it's actually been "set up server" (dandy), set up a bunch of "groups" and "roles" and "circus troupes", download an .msi and install a thing to allow a cmd app to connect a random JSON file to... umm what? I am missing something.

In a nutshell, what needs to happen to deploy an application to EC2?


Example of the Rabbit Hole:

Tutorial

I happen to have done the first four things so...

Create deployment group (and open accompanying AWS dashboard page)

Create a service role (and open accompanying AWS dashboard page)

Back to deployment group Tutorial (this still hasn't told me how or why I'm doing any of these things, just that they need to be done)

I haven't had this many tabs open at once since I lived on Mountain Dew.

Get an error and google it.

AWS CodeDeploy does not have the permissions required to assume the role

That's step 5. Back to Tutorial.

Step 6.

Deploy the application

That sounds promising... oh that's 9 more steps.

Get another permission issue, search again and figure out there are two json objects you need to update in a browser, text area input style, to make this work.

... Flat out guess at which permissions are needed for AmazonEC2. First guess, AmazonEC2FullAccess is apparently not full access to AmazonEC2. Second guess gets it, you specifically need AmazonEC2RoleforAWSCodeDeploy - at least the names are verbose.

Looks like that's working... now I just have to figure out how to set up an SQL DB.

Randy Hall
  • 111
  • 3
  • 1
    AWS is a complex enterprise platform, it typically takes training to learn how to use it. In your case I would suggest you look at AWS Elastic Beanstalk ( https://aws.amazon.com/elasticbeanstalk/ ), which does a lot of the work for you based on AWS best practices. It does things like set up EC2 instance, load balancer, secures things to some degree, etc. Even if you've managed to get things going yourself I suggest you look into this, or have someone with AWS training review your infrastructure, particularly around security. – Tim Sep 19 '22 at 19:15

0 Answers0