'Create' button on ECS Service creation doesn't do anything - amazon-web-services

I want to create an ECS service with ELB ('create new' option) and EC2 as backend. I am using AWS console and I amusing Frankfurt region.
When I click 'Create' button on the console, nothing happens! I cannot see any errors.
I tried the above with admin rights and even with the root account (!).
When I remove ELB, clicking 'Create' operates properly and the service is created.

Related

Log into Windows Server Ec2 instance using IAM user in AWS

This might be a rather simple question, but is it possible to log into an EC2 Windows Server instance over RDP, using an IAM user's credentials, or am I stuck using the password from the KeyPair?
The only way to do that would be to have IAM identity center setup with SSM Fleet manager.
From the documentation:
Fleet Manager integrates with IAM Identity Center so you can connect to your instances without providing additional credentials.
Otherwise, you have to specify either username/password or a the .pem file:
When connecting to your instance, you can use Windows credentials or the Amazon EC2 key pair (.pem file) associated with the instance for authentication.
EC2 instance access over RDP steps as below:
In aws ec2 service site with your IAM login.
screenshot reference
Select your windows server in EC2 instance list. let respective EC2 instance in running state. note then only "Connect" button will be active.
Select connect button. In the new window select 'RDP client' > select the 'Get Password'.
In 'Get password Window', import the pem which was associated with respective windows served in EC2 service. select 'Decrypt password'.
Copy the password, keep pasted in txt file for your future use.
Run 'mstsc' for remote desktop and type the public DNS address (which you can get it from above step 3 window) and login as .\Administrator and use the copied password for login.
Pre requisite steps to edited in EC2 windows instance:
Start the Windows Registry editor (type regedit in the "Start > Run" dialog)
Navigate to: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] "LimitBlankPasswordUse"=dword:00000001 3. Change LimitBlankPasswordUse to 0 (zero) to enable the use of blank passwords, 1 to prevent blank passwords over the network.
this solution considered as alternate.

Can create Elastic Beanstalk application through web interface , but not through awscli/ebcli with same account

Trying to learn AWS. Went to EB on the web interface, created an application and an environment, uploaded code, no problem.
Trying to do the same through the CLI - created an access key for my account, used aws configure set to set access key and secret. However, when I type eb init and choose the same region I used in the web app, the first fishy thing is that it doesn't let me choose the existing app like the eb init documentation said it would, it just asks me for a name to create a new app.
And when I do try to create a new one, I get this:
ERROR: NotAuthorizedError - Operation Denied. User: arn:aws:iam::xxx:user/[my account] is not authorized to perform: elasticbeanstalk:CreateApplication on resource: arn:aws:elasticbeanstalk:eu-central-1:xxx:application/test
What am I doing wrong? This is definitely the same account I used to create through the web app, and I have checked if someone removed my privileges or something - my account still has AdministratorAccess and I can keep creating apps through the web interface to my heart's content.

Should I use EC2 or Elastic Beanstalk when I am creating a new role where my EC2 / Beanstalk instances should have access to S3?

This link says
To create the IAM role
Open the IAM console.
In the navigation pane, select Roles, then Create New Role.
Enter a name for the role, then select Next Step. Remember this name, since you'll need it when you launch your Amazon EC2 instance.
On the Select Role Type page, under AWS Service Roles, select Amazon EC2.
On the Set Permissions page, under Select Policy Template, select Amazon S3 Read Only Access, then Next Step.
On the Review page, select Create Role.
But when you click "Create New Role", you will be asked as follows
They say "choose a service that will use this role"
a) As you launch an app in ElasticBeanStalk which in turn creates an Ec2 instance , should I select Ec2 service or Elastic beanstalk service?
You are creating an EC2 instance role, so the service to select is EC2, regardless of whether or not the instances are being spawned and managed by Elastic Beanstalk.
With an instance role, your instance has continuous access to a set of automatically-rotated temporary credentials that it can use to access whatever services the role policies grant access to.
Here, you are granting the EC2 service permission to actually obtain those temporary credentials on behalf of your instance.
Rule of thumb with AWS, only create the resources you need. The reason for this is that AWS charges you for everything that you use. Now with that said, if you only need an EC2 that can communicate with your S3, then go with an EC2 only. EC2's are sorta like your base server, and you can always link one to your Elastic Beanstalk (if in fact you want to utilize that service later on).
Note, if you eventually begin using your S3 to show content to your users (e.g. your images, videos, etc.), then you should use CloudFront as your CDN to control things like caching, speed, and availability across various regions.
Hope this helps.
The AWS document merely is an example (Apply IAM on EC2). You don't need follow the document mechanically, because your case is different, applying IAM on different type(s) of AWS services.

AWS IoT button Deletion stuck on principals

I would like to delete an AWS IoT Button added to the AWS IoT Resources page at https://console.aws.amazon.com/iot/home?region=us-east-1#/dashboard
But when I check the button name and select Action Delete, I get error message
"The action failed because the input is not valid. Cannot delete. Thing AWS-iot-button-01 is still attached to one or more principals".
I'm not able to delete any policy or certs. But I have been able to revoke them.

AWS Elastic Beanstalk ServiceRole Error When Logging In To A Role

I'm logging into a role through SSO and I'm trying to create a new Elastic Beanstalk environment (newest tomcat if it matters) and I am getting the following error which is preventing me from even getting the environment started building:
(Namespace: 'aws:elasticbeanstalk:environment', OptionName: 'ServiceRole'): Invalid service role
This is happening even when I am trying to clone an existing environment. I've tried to auto generate a service role and to manually create one. Both are giving the error. This error does not happen when I am logging into a user with the same permissions.
When you clone an environment using the Elastic Beanstalk console, you have the option to choose a new platform and a service role. Service role is a new concept in beanstalk documented here. Service is not required if you are using basic health monitoring but it is required if you choose to use enhanced health monitoring.
When creating an environment you can choose to pass an IamInstanceProfile (typically named aws-elasticbeanstalk-ec2-role) and a service role (typically named aws-elasticbeanstalk-service-role). These two roles are required when using Enhanced Application Health Monitoring.
Please note that these two roles require a completely a different set of permissions and you should use different roles for each of them. You can find the list of permissions required for Service Role and Instance profile documented here.
When creating/cloning/modifying environments using AWS console you will be shown an option to choose a service role. If you have never used a Service role before, you will be presented with an option to "Create a new role". The console allows you to create the Service role required by beanstalk using a single button click. You can view the permissions before creating the role.
After the first create, the console will present you with a dropdown with the role you created previously (typically named aws-elasticbeanstalk-service-role) and you can reuse this service role.
From the documentation: "A service role is the IAM role that Elastic Beanstalk assumes when calling other services on your behalf. Elastic Beanstalk uses the service role that you specify when creating an Elastic Beanstalk environment when it calls Amazon Elastic Compute Cloud (Amazon EC2), Elastic Load Balancing, and Auto Scaling APIs to gather information about the health of its AWS resources."
When creating/using a role you need to make sure the IAM user has pass role permission for the role you created. In case you are not using the root account make sure you have the correct policies for the IAM user.
Note the iam:PassRole permission allows your IAM user to pass the role to beanstalk service.
Update
There was an issue with Single Sign On that has now been resolved. Please update here or in the AWS forum thread below if you are still seeing issues.
AWS forum thread: https://forums.aws.amazon.com/thread.jspa?threadID=171369
I got the same error yesterday and a different one today using the same stack "Unable to assign role. Please verify that you have permission to pass this role: XXXXXX."
And I solved assigning this policy "AWSElasticBeanstalkFullAccess" to my user
Here you could read more:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-roles.html#concepts-roles-user
There seems to be a thread on aws support forum here: https://forums.aws.amazon.com/thread.jspa?messageID=670359
I am having the same issue when trying to access a beanstalk environment via crossaccount iam policy.
I think that logging into console with an IAM account that belongs to that particular AWS account with resolve the issue. Im certain AWS folks are working on it