aws-profile | Make AWS CLI profile switch easy | AWS library
kandi X-RAY | aws-profile Summary
kandi X-RAY | aws-profile Summary
Make AWS CLI profile switch easy.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aws-profile
aws-profile Key Features
aws-profile Examples and Code Snippets
Community Discussions
Trending Discussions on aws-profile
QUESTION
I have objects with multiple versions and I am trying to compare which versions I can delete. I basically want to delete any version that has the same size of the current version. The problem that I am having is that I can't find out which of the returned versions is the latest/current.
If I use the aws cli, it returns a field called 'IsLatest' but apparently, the boto3 version doesn't. The aws cli also always returns the StorageClass while boto3 doesn't in some scenarios apparently.
Return from boto3:
...ANSWER
Answered 2022-Feb-19 at 23:53You can list your object versions from a bucket using list_object_versions
API:
QUESTION
Currently I am facing an issue while trying to bind my serverless handlers to my vpc. My command to deploy is the following:
...ANSWER
Answered 2021-Dec-15 at 16:51After some research we were able to connect our lambda to our vpc using serverless. The solution was: Stop using serverless-vpc-plugin
.
It turns out that serverless-vpc-plugin
, automatically creates a AWS VPC, which is not what we were looking for. We already had our VPC created using terraform.
From serverless-vpc-plugin documentation
Automatically creates an AWS Virtual Private Cloud (VPC) using all available Availability Zones (AZ) in a region.
In other words, serverless-vpc-plugin
doesn't make sense when the target vpc already exists
QUESTION
Background:-I have a gateway account( with no permissions) in which users are created and in order to access aws resources we use roles having admin access.
config file
...ANSWER
Answered 2021-Mar-10 at 21:01This is a known issue with Serverless, Serverless only checks ~/.aws/credentials
for the profile and not ~/.aws/config
.
There are multiple Serverless forum posts about this, e.g. this one.
Change your ~/.aws/credentials
file to this and it should work:
QUESTION
I'm trying to create an AWS client for IOT following this article: How can I publish to a MQTT topic in a Amazon AWS Lambda function?
...ANSWER
Answered 2021-Jan-09 at 04:05IoTDataPlane does not have resource. You can only use client
with the IoTDataPlane:
QUESTION
- Create a aws_secretsmanager_secret
- Create a aws_secretsmanager_secret_version
- Store a uniquely generated string as that above version
- Use local-exec provisioner to store the actual secured string using bash
- Reference that string using the secretsmanager resource in for example, an RDS instance deployment.
- Keep all plain text strings out of remote-state residing in a S3 bucket
- Use AWS Secrets Manager to store these strings
- Set once, retrieve by calling the resource in Terraform
Error: Secrets Manager Secret "arn:aws:secretsmanager:us-east-1:82374283744:secret:Example-rds-secret-fff42b69-30c1-df50-8e5c-f512464a4a11-pJvC5U" Version "AWSCURRENT" not found
when running terraform apply
Why isn't it moving the AWSCURRENT version automatically? Am I missing something? Is my bash command wrong? The value does not write to the secret_version, but it does reference it correctly.
Look in main.tf code, which actually performs the command:
...ANSWER
Answered 2020-Sep-23 at 11:11The error likely isn't occuring in your provisioner execution per se, because if you remove the provisioner block the error still occurs on apply--but confusingly only the first time after a destroy.
Removing the data "aws_secretsmanager_secret_version" "rds-secret"
block as well "resolves" the error completely.
I'm guessing there is some sort of config delay issue here...but adding a 20 second delay provisioner to the aws_secretsmanager_secret.rds-secret resource block didn't help. And the value from the data block can be successfully output on subsequent apply runs, so maybe it's not just timing.
Even if you resolve the above more basic issue, it's likely your provisioner will still be confusing things by modifying a resource that Terraform is trying to manage in the same run. I'm not sure there's a way to get around that except perhaps by splitting into two separate operations.
Update:
It turns out that on the first run the data sources are read before the aws_secretsmanager_secret_version resource is created. Just adding depends_on = [aws_secretsmanager_secret_version.rds-secret-version]
to the data "aws_secretsmanager_secret_version"
block resolves this fully and makes the interpolation for your provisioner work as well. I haven't tested the actual provisioner.
Also you may need to consider this (which I take to not always apply to 0.13):
NOTE: In Terraform 0.12 and earlier, due to the data resource behavior of deferring the read until the apply phase when depending on values that are not yet known, using depends_on with data resources will force the read to always be deferred to the apply phase, and therefore a configuration that uses depends_on with a data resource can never converge. Due to this behavior, we do not recommend using depends_on with data resources.
QUESTION
How do I remove/deploy deployment without .serverless directory for team collaboration?
For example if I run sls deploy --aws-profile profile1
with a .yml file it then creates this .serverless directory which I am not including in my git push to hide secrets. Now when someone else clones this repo on my team how can they now manage the same deployment? Is the .yml file and same aws profile sufficient?
ANSWER
Answered 2020-Mar-24 at 18:01The .serverless folder is created by serverless to alocate the cloud formation files. You should not handle them manually (and the folder and it’s content should not be included in source control).
The serverless.yml is the source of truth for the deployment, so it should do the same if running with the same environments.
The AWS account/profile can be set using the AWS cli. Given all the devs use the same account or use accounts with the same level of permissions, each one of you should be able to run deploy/remove.
If you project uses a .env file or environmental variables, each member of the team has to include them in their environment.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-profile
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page