How to Push to a GitHub Repository in IntelliJ

Image
1. Initialize and Connect the Git Repository # Run in the terminal from the project root git init git remote add origin https://github.com/[user]/[repository].git 2. Configure Git in IntelliJ Select VCS → Enable Version Control Integration . Choose Git and click OK . 3. Connect Your GitHub Account Go to File → Settings (on Windows) or IntelliJ IDEA → Preferences (on macOS). Navigate to Version Control → GitHub . Click Add Account ( + ). Select Log In with Token... and enter your GitHub Personal Access Token. 4. Add and Commit Files Go to VCS → Git → Add (or use the shortcut Ctrl+Alt+A ). Select the files you want to commit. Go to VCS → Commit (or use the shortcut Ctrl+K ). Write a commit message and click Commit . 5. Push Go to VCS → Git → Push (or use the shortcut Ctrl+Shift+K ). Click the Push button. Simpler Method (Using IntelliJ's Built-in Feature) Go to VCS → Share Project on GitHub . Set the repository name to vita-user-...

AWS SAM Template: How to Properly Define Inline IAM Policies

AWS Serverless Application Model (SAM) is a powerful framework for defining serverless resources like Lambda functions. One commonly misunderstood part of SAM templates is the Policies section under AWS::Serverless::Function.

I used to write YAML files without ever including the Version field, so I habitually left it out in the Policies section as well — this caused unexpected error when deploying, and it took me quite a while to figure out what was wrong and fix the problem.

Incorrect: Using Only "- Statement:"

Policies:
  - Statement:
      - Effect: Allow
        Action:
          - transcribe:GetMedicalTranscriptionJob
        Resource: "*"

This will result in errors like:

Invalid ARN: Could not be parsed!
Template format error: Every policy must contain a Version field

Correct: Include Full Policy Document

Policies:
  - Version: '2012-10-17'
    Statement:
      - Effect: Allow
        Action:
          - transcribe:GetMedicalTranscriptionJob
        Resource: "*"

IAM policies always require a complete structure with a Version and a Statement array:

{
  "Version": "2012-10-17",
  "Statement": [ ... ]
}

Since AWS SAM directly expects this structure, omitting the Version will cause deployment errors.

Why 'Version' Is Required in SAM Inline Policies

  • The AWS SAM Developer Guide does not contain an explicit statement such as "When defining an inline policy in the Policies section, you must include Version: '2012-10-17'."
  • However, since the expected input for the Policies property is a standard IAM policy document, which includes the Version: '2012-10-17' field, it is reasonable to infer that including this field is the correct approach.

Comments

Popular posts from this blog

Resolving Key Exchange Failure When Connecting with SecureCRT to OpenSSH

SecureCRT] How to Back Up and Restore SecureCRT Settings on Windows

How to Set Up Vaultwarden (Bitwarden) on Synology NAS (Best Free Alternative to LastPass)