mac – macOS Catalina on AWS: merging partitions

I have created a macOS Catalina EC2 instance on AWS with an EBS volume size of 60 GB.
Then I resized the volume on AWS to 120 GB and tried the following commands to resize the APFS container accordingly:

PDISK=$(diskutil list physical external | head -n1 | cut -d" " -f1)
APFSCONT=$(diskutil list physical external | grep "Apple_APFS" | tr -s " " | cut -d" " -f8)
yes | sudo diskutil repairDisk $PDISK
sudo diskutil apfs resizeContainer $APFSCONT 0

Unfortunately the last command gives me the following output:

Started APFS operation Error: -69743: The new size must be different
than the existing size

That’s the output of “diskutil list”:

Output of diskutil list on my macOS instance

I am not sure about what’s happening, but I am wondering, would it be possible to merge disk1 and disk0 into one disk? Without breaking the system, and where I could install applications as “normal”.

linux – sudo: aws: command not found

Installed aws cli 2 on my Centos machine. Added PATH=”/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin” to /etc/environment. Most of the cases aws command can be called successfully. However, when using ‘sudo aws’, it shows command not found. Below are all the scenarios. Any idea?

[centos@ip-172-20-x-x ~]$ aws --version
aws-cli/2.1.28 Python/3.8.8 Linux/3.10.0-1160.11.1.el7.x86_64 exe/x86_64.centos.7 prompt/off
[centos@ip-172-20-x-x ~]$ sudo su
[root@ip-172-20-x-x centos]# aws --version
aws-cli/2.1.28 Python/3.8.8 Linux/3.10.0-1160.11.1.el7.x86_64 exe/x86_64.centos.7 prompt/off
[root@ip-172-20-x-x centos]# sudo aws --version
sudo: aws: command not found
[root@ip-172-20-x-x centos]# cat /etc/environment
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin"
[root@ip-172-20-x-x centos]# sudo env
HOSTNAME=ip-172-20-x-x.ap-southeast-1.compute.internal
TERM=xterm
HISTSIZE=1000
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
USERNAME=root
MAIL=/var/spool/mail/centos
LANG=en_US.UTF-8
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
LOGNAME=root
USER=root
HOME=/root
SHELL=/bin/bash
SUDO_COMMAND=/bin/env
SUDO_USER=root
SUDO_UID=0
SUDO_GID=0
XDG_SESSION_ID=20

How to authenticate jenkins with aws directory services?

AWS has directory service which will create AD accounts to use with.
My jenkins server is hosted on an ec2 linux instance on AWS server.
Is there any way to set the jenkins to use the AD accounts to login with it?

Please help me on this.

active directory plugin seems to work only for our own hosted AD environment but not for AWS directory service.

amazon web services – Why does AWS EMR require 2 different security groups for Master and Core/Task nodes?

I am setting up an EMR job and finding that I must specify Master and Core/Task specific security groups. What is the point of having 2? If I run in client mode – I will only utilize the Master security group anyways. And I believe if I run the EMR job on cluster mode it should only utilize the security group of core/task is this not correct?

That is at least my understanding since when I choose between client or cluster mode it tells me this:

Run your driver on a slave node (cluster mode) or on the master node as an external client (client mode).

ms office – Using aws run command – document type powershell- not able to open a excel sheet, make some change and save it

I am trying to run a powershell script using aws runcommand (aws powershell) on windows machine. The powershell script downloads an excel file from S3 location, runs a vbscript which inturn opens this excel file, make changes and saves it in the system. I have already logged into the windows ec2 machine as administrator, and signed with my valid login and saved.

When I run this powershell script through aws runcommand powershell documentype, the powershell always open new microsoft excel and prompts for sign.

As per my understanding, aws runcommand connects to windows ec2 with system32 console and creates a new session to execute a command. My question is how can I have excel signed with my id and when excel application is opened, it doesn’t prompt for sign?

amazon rds – AWS RDS MariaDB dropping connection after CREATE TABLE with CHECK followed by CREATE INDEX

I’ve spun up a fresh MariaDB T2 micro instance with all of the default settings (have observed same behavior on t3-micro and t3-small).

Running this script:

CREATE TABLE test (
    id INTEGER NOT NULL AUTO_INCREMENT, 
    `checked` INT NOT NULL,
    a_column VARCHAR(64) NOT NULL, 
    CONSTRAINT pk_league PRIMARY KEY (id),
    CONSTRAINT `ck_checked` CHECK (`checked` IN (0, 1, 2, 3))
);

CREATE INDEX ix_test_a_column ON test (a_column);

Causes this error:

Error occurred during SQL query execution

Reason:
SQL Error (08): Could not connect to address=(host=database-1.xxxxxxxxxxxxxx.ap-southeast-2.rds.amazonaws.com)(port=3306)(type=master) : Connection refused (Connection refused)

However, when I reconnect, the table test has been created, including the index.

No issue running the script on a local MariaDB 10.4 docker container, likewise no issue if I remove either of the CONSTRAINT ... CHECK or CREATE INDEX. If I replace the CREATE INDEX statement with SELECT 1; there is also no error.

Given that there is a difference in behavior between the docker db instance and the RDS instance, I’m hoping there might be some difference in configuration between the two that might explain the behavior on AWS and would appreciate any insight!

The server logs:

210215 7:38:57 (ERROR) mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.4.13-MariaDB-log
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=5
max_threads=68
thread_count=12
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 174615 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x2b48cfb35f88
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x2b48a41cbdd8 thread_stack 0x40000
/rdsdbbin/mysql/bin/mysqld(my_print_stacktrace+0x29)(0x5582a9cbc039)
mysys/stacktrace.c:270(my_print_stacktrace)(0x5582a970b75d)
sigaction.c:0(__restore_rt)(0x2b48a5211100)
/rdsdbbin/mysql/bin/mysqld(_ZN12Item_func_in7cleanupEv+0x31)(0x5582a981e141)
sql/item_cmpfunc.h:2414(Item_func_in::cleanup())(0x5582a94e7c9d)
sql/item.h:2183(Item::delete_self())(0x5582a94eadeb)
sql/sql_parse.cc:8104(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))(0x5582a9535d1a)
sql/sql_parse.cc:1853(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))(0x5582a9537655)
sql/sql_parse.cc:1368(do_command(THD*))(0x5582a9538a21)
sql/sql_connect.cc:1456(do_handle_one_connection(CONNECT*))(0x5582a960e34f)
sql/sql_connect.cc:1362(handle_one_connection)(0x5582a960e404)
pthread_create.c:0(start_thread)(0x2b48a5209dc5)
/lib64/libc.so.6(clone+0x6d)(0x2b48a5514c9d)

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x2b48cfb6f620): CREATE INDEX ix_test_a_column ON test (a_column)
Connection ID (thread ID): 14
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

amazon web services – Lots of spam in one Users AWS Workmail inbox

We run AWS Workmail for one customer which has multiple users an mailboxes.

In only one of the inboxes there is a lot of spam. It’s not an address such as info@ or similar.

Are there any settings which might be wrong? I did not exactly find any spam protection settings in AWS Workmail.

microservices – Topics best practices – AWS SNS and others

I’m designing a medium size project that will have few decoupled microservices.

I want to avoid costly architecture mistakes at the very beginning.

What I’m wondering (I googled and didn’t found any answer) is if SNS topic should be relatively generic (e.g. “orders-events-topic”) or rather there should be separate topic per each event (e.g. “order-created-topic”, “order-accepted-topic”, etc.).

I realize that “it depends” – nevertheless I’d like to make a mindful decision.