#aws - September 2019

81 messages

:aws: Discussion related to Amazon Web Services (AWS)
Archive: https://archive.sweetops.com/aws/

September 2019
Alejandro Rivera
Alejandro Riveraabout 7 years ago
Is there a way to use wildcards on s3 bucket policies on Principals ? e.g.:
we have:
arn:aws:iam::999999999:role/role-name123456789

would like to do something like:
arn:aws:iam::999999999:role/role-name*
Andy
Andyabout 7 years ago(edited)
@Alejandro Rivera Take a look at this:
https://stackoverflow.com/a/56678945/10846194
Ref: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
You cannot use it as a wildcard to match part of a name or an ARN. We also strongly recommend that you do not use a wildcard in the Principal element in a role's trust policy unless you otherwise restrict access through a Condition element in the policy. Otherwise, any IAM user in any account can access the role.
Shannon Dunn
Shannon Dunnabout 7 years ago
for anyone with using OU and SCPs with lots of accounts inside, how do you manage change of the SCPs and the OU structure it self
Shannon Dunn
Shannon Dunnabout 7 years ago
is it wise to replicate the entirety of the OU structure into a dev,qa,prod, each with its own root etc...
Shannon Dunn
Shannon Dunnabout 7 years ago
especially for hub and spoke modules, things like a logging,transit, shared services, would get their own dev/qa/prod as well
Shannon Dunn
Shannon Dunnabout 7 years ago
or is anyone using IAC to manage SCPs and OU
curious deviant
curious deviantabout 7 years ago
Hey Shannon.. I just started a spike around AWS Control Tower (CT) for multi-account governance and one of the first questions that came to my mind was similar to yours. I think a lot depends on how we organize our OUs. So far I can only speak to the SCP change 🙂 ...How I think I'll go about it is I'll create 3 OU's : DEV , QA and PROD say .. and SCPs changes would be rolled out first to DEV and then higher environments. So basically I would not replicate the OU structure but create separate OUs and move changes through them. This will give me an opportunity to identify and address any breaking changes. For my particular case (using CT), IAC is not an option since CT doesn't expose any APIs yet..everything is pretty much manual/done by CT (logging bucket creation etc). I will be spending sometime on CT further.
curious deviant
curious deviantabout 7 years ago(edited)
Let me know if you have more questions/suggestions.. will help me plan my OU structure better 🙂
joshmyers
joshmyersabout 7 years ago
Anyone seen it look like a CloudWatch rule triggered - i.e. you can see the rule metrics for “invoked” - where invoke invokes a Lambda function…but checking the lambda function that is invoked, doesn’t show any invocations or logs…? I can “test” the lambda function manually and it works fine…
Maciek Strömich
Maciek Strömichabout 7 years ago
maybe cloudwatch events doesn’t have ability to trigger lambda?
Maciek Strömich
Maciek Strömichabout 7 years ago
we had similar issues in the beginning while triggering lambdas behind api-gateway
joshmyers
joshmyersabout 7 years ago
Also seeing this for a different thing but similar issues whereby Cloudwatch alert > SNS > Lambda , it looks like the thing is working, but Lambda isn’t actually invoked and isn’t showing anything in the logs either… but enabling sns delivery notifications…
joshmyers
joshmyersabout 7 years ago
joshmyers
joshmyersabout 7 years ago
SNS thinks it successfully triggered that lambda function…
joshmyers
joshmyersabout 7 years ago
lambda function thinks otherwise…
joshmyers
joshmyersabout 7 years ago
Can’t see anything in Cloudtrail and this def has worked in the past..
Maciek Strömich
Maciek Strömichabout 7 years ago
maybe lambda isn’t able to save logs ;D
joshmyers
joshmyersabout 7 years ago
It can when I invoke it manually with a test event
joshmyers
joshmyersabout 7 years ago
and the code hasn’t changed that does this, and it was working yesterday… >_<
joshmyers
joshmyersabout 7 years ago
Lambda doesn’t even look like it has been invoked looking at the metrics for it…
joshmyers
joshmyersabout 7 years ago
Also seeing 2 different AWS Elasticsearch clusters 504…while another is OK…all in eu-west-1
joshmyers
joshmyersabout 7 years ago
nvm, swamped ENIs
Brij S
Brij Sabout 7 years ago
has anyone used github actions with the awscli? The repo has the HCL syntax and im trying it with yml and running into some issues
Marcio Rodrigues
Marcio Rodriguesabout 7 years ago
Hello, i'm curious about how you guys are doing disaster recover tasks in your company
Marcio Rodrigues
Marcio Rodriguesabout 7 years ago
Do you guys fully automate it? Run via CI? Do heavy tasks with terraform? How is your plan
Marcio Rodrigues
Marcio Rodriguesabout 7 years ago
ps: by limited money, i am tasked to not keep a full replicated environment in another AWS region, but i should have a plan to recreate my infrastructure in another region if needed
Brij S
Brij Sabout 7 years ago
for python lambda packages; do you need to include os and json in the deployment package?
mk
mkabout 7 years ago
hi
mk
mkabout 7 years ago
Anyone he experienced with setting up an health check between AWS and Aliyun?
Abel Luck
Abel Luckabout 7 years ago
since july the session manager should support ssh tunnels
Abel Luck
Abel Luckabout 7 years ago
has anyone actually got it working?
asmito
asmitoabout 7 years ago
for me no, please share your experience with it, when you experiment it
Abel Luck
Abel Luckabout 7 years ago
well first, i discovered that the ssm-agent wasn't up to date on my ubuntu and debian hosts, because they don't release the snap package to the stable channel often
Abel Luck
Abel Luckabout 7 years ago
so if you're running the ssm-agent via snap, then you need to switch to the candidates channel
Abel Luck
Abel Luckabout 7 years ago
that'll get you the latest ssm-agent version
Abel Luck
Abel Luckabout 7 years ago
however they aren't working for me, when I execute the ssh command I get the error
Abel Luck
Abel Luckabout 7 years ago
debug1: ssh_exchange_identification: ----------ERROR-------

debug1: ssh_exchange_identification: Encountered error while initiating handshake. SessionType failed on client with status 2 error: Failed to process action SessionType: Unknown session type Port
asmito
asmitoabout 7 years ago
thanks for sharing your experience will check it with you
Abel Luck
Abel Luckabout 7 years ago
Got it working 😄
Abel Luck
Abel Luckabout 7 years ago
My local session manager plugin was out of date
Abel Luck
Abel Luckabout 7 years ago
so make sure you update the ssm-agent on the ec2 instance, and also your local session manager plugin
Abel Luck
Abel Luckabout 7 years ago
you need session manager plugin version 1.1.23.0 or later, and on the ec2 instance amazon-ssm-agent 2.3.672.0 or later
asmito
asmitoabout 7 years ago
Cool, congrats then 🚀
Abel Luck
Abel Luckabout 7 years ago
"SessionType failed *on client*" was the clue
asmito
asmitoabout 7 years ago
Team, Question regarding Costs please :
- i have created a CNAME record in cloudflare that points to an Internal Load balancer of Nginx, the record will be used just inside the vpc the same region different AZs, normally i will be charged for 0.01/GB of data transfer + load balancing costs, but using cloudflare, does the traffic will be out the vpc to cloudflare and in again ?
Phuc
Phucabout 7 years ago
Hi Guys, anyone deal with SSM module in terraform. we have a case that we want to use that TF module to read the content in the file and create a list of key-value pairs to put on AWS SSM. Kinda long list in this format:
```
VARA="value"
VARB="value1"
.
dalekurt
dalekurtabout 7 years ago
Has anyone seen or used AWS Landing Zone solution?
oscar
oscarabout 7 years ago
What is the recommended EBS size for Kafka?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)about 7 years ago
Can that be generalized? I think it relates directly to the amount of data you will be storing and the retention
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)about 7 years ago
The number replicas you will have
vluck
vluckabout 7 years ago
Hiya! Has anyone gotten RDS clusters to work with micro size? (db.t2.micro or db.t3.micro)? Although it's listed in the documentation, I keep getting
InvalidParameterCombination: RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.t3.micro, Engine=aurora-postgresql, EngineVersion=10.7,
Andriy Knysh (Cloud Posse)
Andriy Knysh (Cloud Posse)about 7 years ago
Aurora Support for db.t3

Aurora MySQL supports the db.t3.medium and db.t3.small instance classes for Aurora MySQL 1.15 and higher, and all Aurora MySQL 2.x versions. These instance classes are available for Aurora MySQL in all Aurora regions except AWS GovCloud (US-West), AWS GovCloud (US-East), and China (Beijing).

Aurora PostgreSQL supports only the db.t3.medium instance class for versions compatible with PostgreSQL 10.7 or later. These instance classes are available for Aurora PostgreSQL in all Aurora regions except China (Ningxia).
vluck
vluckabout 7 years ago

supports only the db.t3.medium instance class
vluck
vluckabout 7 years ago
wow
vluck
vluckabout 7 years ago
then it goes on to say
vluck
vluckabout 7 years ago

These instance classes are available for Aurora PostgreSQL
vluck
vluckabout 7 years ago
like, it should say "instance class", not plural. There is one. 😞
vluck
vluckabout 7 years ago
thanks @Andriy Knysh (Cloud Posse)
pablo
pabloabout 7 years ago(edited)
Hi, anyone know whats the minimum set of permissions needed to run an EMR "jobflow"? This action creates an emr cluster, executes whatever, then terminates the cluster. I'm setting this up from an ec2 instance running Airflow, and I'm reluctant to give it full admin access
rohit
rohitabout 7 years ago
Does anyone know if there is a way to copy all version of S3 objects from bucket to another S3 bucket ?
Maarten van der Hoef
Maarten van der Hoefabout 7 years ago
@rohit have you tried it with the awscli ?
aws s3 sync
rohit
rohitabout 7 years ago(edited)
AFAIK aws s3 sync does not copy all the versions
Maarten van der Hoef
Maarten van der Hoefabout 7 years ago
the version ID's will get lost but where have you read that it does not copy all versions ?
rohit
rohitabout 7 years ago
i tried the sync command before posting my question and it did not copy all the versions
Maarten van der Hoef
Maarten van der Hoefabout 7 years ago
That's interesting @rohit , versions missing, or was it only copying exactly one version ?
rohit
rohitabout 7 years ago
yes it is only copying one version
rohit
rohitabout 7 years ago
maybe the latest version
Maarten van der Hoef
Maarten van der Hoefabout 7 years ago
and have you set versioning to enabled on the destination bucket ?
Maarten van der Hoef
Maarten van der Hoefabout 7 years ago
probably, otherwise you wouldn't see different versions.
rohit
rohitabout 7 years ago
correct
Nikola Velkovski
Nikola Velkovskiabout 7 years ago
Hi people, anyone having issues with lambdas and setting reserved-concurrent-executions ?
it seems that it doesn't work but there's no mention on any outages on AWS
Nikola Velkovski
Nikola Velkovskiabout 7 years ago
Nikola Velkovski
Nikola Velkovskiabout 7 years ago
they've just published it
IvanM
IvanMabout 7 years ago
Guys don’t you pls know whether it’s possible to extract host parts in AWS ALB listeners custom redirection?

My use case is that I will have a host <http://foo.bar.com|foo.bar.com> and inside listener redirect rule I want to extract foo from #{host}
Igor
Igorabout 7 years ago
@IvanM I don't think that's possible