Trigger external API Calls with Cloudwatch Events

I am looking for a solution to make a POST Request to an External API when the state of an EC2 Instance changes. I want to use Cloudwatch so that I can pass the InstanceId to the API with the Input Transformer option. Is there a way to do this without involving Lambda? (upstream requirement) … Read more

AWS Inline Policy to Limit Automation Document Execution per IAM

AWS Inline Policy to Limit Automation Document Execution per IAM is my goal, but understanding current limitations I can see that I can only use * wildcard and can’t specify a specific document. Is there any way to limit specific IAM to only have access over specific automation documents. { “Version”: “2012-10-17”, “Statement”: [ { … Read more

Cognito User Pool trying to send SMS when it’s configured for email sending

I’m using the serverless framework in order to create a Cognito User Pool using the following CloudFormation configuration: Resources: CognitoUserPool: Type: AWS::Cognito::UserPool Properties: # Generate a name based on the stage UserPoolName: ${opt:stage}-user-pool # Set email as an alias UsernameAttributes: – email AutoVerifiedAttributes: – email MfaConfiguration: OFF EmailVerificationMessage: ‘message here’ EmailVerificationSubject: ‘subject here’ Policies: PasswordPolicy: … Read more

AWS EC2 Windows CloudWatch Agent to push memory and disk space metrics

I am trying to configure custom metrics for windows server in EC2. I need memory utilization and free disk space metrics from perfmon. So, the document says we can use AWS SSM and cloudwatch agent to push these metrics. Have enabled SSM and attached role and everything on EC2. The config file I created in … Read more

AWS AMI import of HyperV Virtual Machine on LVM extended partition on Two drives

I am having a problem today while importing a hyper-V vm to AWS AMI. Actually my VM has 2 Harddisk and both of them LVM set and use as single LVG expended volume on both drives. now when i am importing first disk as ami. it give me an error saying “Logical volume group activation … Read more

How do I poll for when the ssm agent is started and session manager can connect for newly created instances?

I use SSM to connection to windows ec2 instances with the cli: aws ssm start-session –target <id> It takes the ssm service on a windows instance a few mins to start sometimes I can check when its done initializing like this aws ec2 wait instance-status-ok –instance-ids <id> But even after its done initializing it frequently … Read more

Can’t RDP Into EC2 After Running Systems Manger Command

I ran a very simple powershell script (setting up odbc) on a bunch of EC2 instances using AWS Systems Manager. The script worked but now I am unable to RDP into any of the instances. I have tried start/stop/reboot, as well as running the troubelshoot rdp automation in systems manager, but no luck. The servers … Read more

SSH connection getting a Connection timed out in AWS

I have a website hosted in AWS EC2 with the t2.micro instance(Ubuntu 18.04.4). When I tried to connect through Putty or browser-based SSH connection from the AWS console, i am getting a connection timeout error. I tried using the instructions in the following link to fix it, but the console is stuck after I run … Read more

Web app runs super slow after AWSSupport-ResetAccess

Here’s what happened: I spun up an EC2 instance I successfully installed Ghost on it (a self-hosted blogging platform) I lost my *.pem private key that gives me access to the EC2 intance I ran the AWSSupport-ResetAccess automation service to recover the password I successfully recovered the password However, if I open any page on … Read more

How do I enable aws inventory with terraform?

I have to go to the AWS UI and select “enable inventory” on managed instances- what is aws doing when I click this button? Can I do this with terraform somehow so I dont need to keep going to the UI and enabling it for new instances? I can’t find a terraform resource for aws … Read more